mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +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:
|
case MT_FALLINGROCK:
|
||||||
// Despawn rocks here in case zmovement code can't do so (blame slopes)
|
// Despawn rocks here in case zmovement code can't do so (blame slopes)
|
||||||
if (!mobj->momx && !mobj->momy && !mobj->momz
|
if (!mobj->momx && !mobj->momy && !mobj->momz
|
||||||
&& ((mobj->z <= mobj->floorz && !(mobj->eflags & MFE_VERTICALFLIP))
|
&& ((mobj->eflags & MFE_VERTICALFLIP) ?
|
||||||
|| (mobj->z + mobj->height >= mobj->ceilingz && mobj->eflags & MFE_VERTICALFLIP)))
|
mobj->z + mobj->height >= mobj->ceilingz
|
||||||
|
: mobj->z <= mobj->floorz))
|
||||||
{
|
{
|
||||||
P_RemoveMobj(mobj);
|
P_RemoveMobj(mobj);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue