mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Better plan, use ?: for deciding between floorz/ceiling checks based on gravity
This commit is contained in:
parent
659a62db88
commit
9a2b7b2091
1 changed files with 3 additions and 2 deletions
|
@ -6651,8 +6651,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
case MT_FALLINGROCK:
|
||||
// Despawn rocks here in case zmovement code can't do so (blame slopes)
|
||||
if (!mobj->momx && !mobj->momy && !mobj->momz
|
||||
&& ((mobj->z <= mobj->floorz && !(mobj->eflags & MFE_VERTICALFLIP))
|
||||
|| (mobj->z + mobj->height >= mobj->ceilingz && mobj->eflags & MFE_VERTICALFLIP)))
|
||||
&& ((mobj->eflags & MFE_VERTICALFLIP) ?
|
||||
mobj->z + mobj->height >= mobj->ceilingz
|
||||
: mobj->z <= mobj->floorz))
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue