mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 17:11:33 +00:00
Fix PlayerZMovement spam and infinite MFE_JUSTHITFLOOR when standing on a solid object
This commit is contained in:
parent
b6544efceb
commit
b2ff4e6167
1 changed files with 4 additions and 15 deletions
13
src/p_mobj.c
13
src/p_mobj.c
|
@ -3781,7 +3781,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
|
||||
// always do the gravity bit now, that's simpler
|
||||
// BUT CheckPosition only if wasn't done before.
|
||||
if (!(mobj->eflags & MFE_ONGROUND) || mobj->momz
|
||||
if (mobj->momz
|
||||
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z + mobj->height != mobj->ceilingz)
|
||||
|| (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z != mobj->floorz)
|
||||
|| P_IsObjectInGoop(mobj))
|
||||
|
@ -3794,17 +3794,6 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if 0 // i don't know why this is here, it's causing a few undesired state glitches, and disabling it doesn't appear to negatively affect the game, but i don't want it gone permanently just in case some obscure bug crops up
|
||||
if (!(mobj->player->powers[pw_carry] == CR_NIGHTSMODE)) // used for drilling
|
||||
mobj->player->pflags &= ~PF_STARTJUMP;
|
||||
mobj->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||
if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
|
||||
{
|
||||
mobj->player->secondjump = 0;
|
||||
mobj->player->powers[pw_tailsfly] = 0;
|
||||
P_SetMobjState(mobj, S_PLAY_WALK);
|
||||
}
|
||||
#endif
|
||||
mobj->eflags &= ~MFE_JUSTHITFLOOR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue