Run squish effect for players too

This is ironic.
This commit is contained in:
James R 2021-11-28 23:14:31 -08:00
parent 696ca049d8
commit 1e73c842e2

View file

@ -3511,6 +3511,16 @@ static void P_CheckFloatbobPlatforms(mobj_t *mobj)
}
}
static void P_SquishThink(mobj_t *mobj)
{
if (!(mobj->eflags & MFE_SLOPELAUNCHED))
{
K_Squish(mobj);
}
mobj->lastmomz = mobj->momz;
}
static void P_PlayerMobjThinker(mobj_t *mobj)
{
I_Assert(mobj != NULL);
@ -3576,6 +3586,8 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
mobj->eflags &= ~MFE_JUSTHITFLOOR;
}
P_SquishThink(mobj);
animonly:
P_CyclePlayerMobjState(mobj);
}
@ -8805,6 +8817,8 @@ void P_MobjThinker(mobj_t *mobj)
P_ButteredSlope(mobj);
}
P_SquishThink(mobj);
if (mobj->flags & (MF_ENEMY|MF_BOSS) && mobj->health
&& P_CheckDeathPitCollide(mobj)) // extra pit check in case these didn't have momz
{
@ -8867,11 +8881,6 @@ void P_MobjThinker(mobj_t *mobj)
default:
break;
}
if (!(mobj->eflags & MFE_SLOPELAUNCHED))
K_Squish(mobj);
mobj->lastmomz = mobj->momz;
}
// Quick, optimized function for the Rail Rings