Merge branch 'falling-rocks-fix' into 'next'

Falling rocks fix

This fixes the rock spawners' rocks not being removed if they rolled down to the ground from a slope rather than bouncing (see https://mb.srb2.org/showthread.php?t=41963)

See merge request !162
This commit is contained in:
Monster Iestyn 2017-04-24 20:41:32 -04:00
commit e03577d957

View file

@ -6648,6 +6648,18 @@ void P_MobjThinker(mobj_t *mobj)
}
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:
if (mobj->threshold)
{