From 1ad993236f1eec0c311fc1fb368b46ad44be69d3 Mon Sep 17 00:00:00 2001 From: ZTsukei Date: Mon, 24 Apr 2017 22:31:55 -0400 Subject: [PATCH] Monster Iestyn's Falling-Rocks-On-Slope fix --- src/p_mobj.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index d1e6a584..ec378e40 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6937,6 +6937,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) {