PolyObjFade: Apply RENDER, SOLID, and NOSPECIALS flags according to spawnflags

This commit is contained in:
mazmazz 2018-09-12 22:08:07 -04:00
parent 2f9e014aab
commit 0697a1b90a

View file

@ -2898,7 +2898,7 @@ void T_PolyObjFade(polyfade_t *th)
if (po->translucency >= NUMTRANSMAPS) // invisible
po->flags &= ~POF_RENDERALL;
else
po->flags |= POF_RENDERALL;
po->flags |= (po->spawnflags & POF_RENDERALL);
// set collision
if (th->docollision && th->speed)
@ -2910,14 +2910,15 @@ void T_PolyObjFade(polyfade_t *th)
}
else
{
po->flags |= POF_SOLID;
po->flags &= ~POF_NOSPECIALS;
po->flags |= (po->spawnflags & POF_SOLID);
if (!(po->spawnflags & POF_NOSPECIALS))
po->flags &= ~POF_NOSPECIALS;
}
}
}
else
{
po->flags |= POF_RENDERALL;
po->flags |= (po->spawnflags & POF_RENDERALL);
// set collision
if (th->docollision && th->speed)
@ -2929,8 +2930,9 @@ void T_PolyObjFade(polyfade_t *th)
}
else
{
po->flags |= POF_SOLID;
po->flags &= ~POF_NOSPECIALS;
po->flags |= (po->spawnflags & POF_SOLID);
if (!(po->spawnflags & POF_NOSPECIALS))
po->flags &= ~POF_NOSPECIALS;
}
}
}