don't ignore mdlshadow flag

master
Lee Salzman 2013-05-28 22:50:44 +03:00
parent 8fcf45d802
commit ecf45c3c9a
2 changed files with 3 additions and 2 deletions

View File

@ -662,7 +662,7 @@ void rendershadowmodelbatches(bool dynmodel)
loopv(batches)
{
modelbatch &b = batches[i];
if(b.batched < 0 || (!dynmodel && (!(b.flags&MDL_MAPMODEL) || b.m->animated()))) continue;
if(b.batched < 0 || !b.m->shadow || (!dynmodel && (!(b.flags&MDL_MAPMODEL) || b.m->animated()))) continue;
bool rendered = false;
for(int j = b.batched; j >= 0;)
{
@ -901,6 +901,7 @@ void rendermapmodel(int idx, int anim, const vec &o, float yaw, float pitch, flo
int visible = 0;
if(shadowmapping)
{
if(!m->shadow) return;
visible = shadowmaskmodel(center, radius);
if(!visible) return;
}

View File

@ -994,7 +994,7 @@ void batchshadowmapmodels()
for(octaentities *oe = shadowmms; oe; oe = oe->rnext) loopvk(oe->mapmodels)
{
extentity &e = *ents[oe->mapmodels[k]];
if(e.flags&extentity::F_NOVIS) continue;
if(e.flags&(extentity::F_NOVIS|extentity::F_NOSHADOW)) continue;
e.visible = true;
}
for(octaentities *oe = shadowmms; oe; oe = oe->rnext) loopvj(oe->mapmodels)