mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-11 18:42:46 +00:00
Run squish effect for players too
This is ironic.
This commit is contained in:
parent
696ca049d8
commit
1e73c842e2
1 changed files with 14 additions and 5 deletions
19
src/p_mobj.c
19
src/p_mobj.c
|
|
@ -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)
|
static void P_PlayerMobjThinker(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
I_Assert(mobj != NULL);
|
I_Assert(mobj != NULL);
|
||||||
|
|
@ -3576,6 +3586,8 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
||||||
mobj->eflags &= ~MFE_JUSTHITFLOOR;
|
mobj->eflags &= ~MFE_JUSTHITFLOOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
P_SquishThink(mobj);
|
||||||
|
|
||||||
animonly:
|
animonly:
|
||||||
P_CyclePlayerMobjState(mobj);
|
P_CyclePlayerMobjState(mobj);
|
||||||
}
|
}
|
||||||
|
|
@ -8805,6 +8817,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
P_ButteredSlope(mobj);
|
P_ButteredSlope(mobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
P_SquishThink(mobj);
|
||||||
|
|
||||||
if (mobj->flags & (MF_ENEMY|MF_BOSS) && mobj->health
|
if (mobj->flags & (MF_ENEMY|MF_BOSS) && mobj->health
|
||||||
&& P_CheckDeathPitCollide(mobj)) // extra pit check in case these didn't have momz
|
&& P_CheckDeathPitCollide(mobj)) // extra pit check in case these didn't have momz
|
||||||
{
|
{
|
||||||
|
|
@ -8867,11 +8881,6 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mobj->eflags & MFE_SLOPELAUNCHED))
|
|
||||||
K_Squish(mobj);
|
|
||||||
|
|
||||||
mobj->lastmomz = mobj->momz;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quick, optimized function for the Rail Rings
|
// Quick, optimized function for the Rail Rings
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue