Monster Iestyn's Falling-Rocks-On-Slope fix

This commit is contained in:
ZTsukei 2017-04-24 22:31:55 -04:00
parent cdf8d793bd
commit 1ad993236f

View file

@ -6937,6 +6937,18 @@ void P_MobjThinker(mobj_t *mobj)
} }
else switch (mobj->type) else switch (mobj->type)
{ {
case MT_FALLINGROCK:
// Despawn rocks here in case zmovement code can't do so (blame slopes)
if (!mobj->momx && !mobj->momy && !mobj->momz
&& ((mobj->eflags & MFE_VERTICALFLIP) ?
mobj->z + mobj->height >= mobj->ceilingz
: mobj->z <= mobj->floorz))
{
P_RemoveMobj(mobj);
return;
}
P_MobjCheckWater(mobj);
break;
case MT_EMERALDSPAWN: case MT_EMERALDSPAWN:
if (mobj->threshold) if (mobj->threshold)
{ {