mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-27 22:52:41 +00:00
Prevent airwalking in general, but only when going down.
This commit is contained in:
parent
9cdad10ae6
commit
12b24517de
1 changed files with 6 additions and 0 deletions
|
@ -8149,6 +8149,7 @@ static void P_MovePlayer(player_t *player)
|
|||
}
|
||||
|
||||
// Correct floating when ending up on the ground.
|
||||
// Also fight against airwalking when going down.
|
||||
if (onground)
|
||||
{
|
||||
if (player->mo->state-states == S_PLAY_FLOAT)
|
||||
|
@ -8156,6 +8157,11 @@ static void P_MovePlayer(player_t *player)
|
|||
else if (player->mo->state-states == S_PLAY_FLOAT_RUN)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((player->mo->state-states == S_PLAY_WALK || player->mo->state-states == S_PLAY_RUN) && P_MobjFlip(player->mo)*player->mo->momz < 0)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
}
|
||||
|
||||
// If Springing (or nojumpspinning), but travelling DOWNWARD, change back!
|
||||
if ((player->panim == PA_SPRING && P_MobjFlip(player->mo)*player->mo->momz < 0)
|
||||
|
|
Loading…
Reference in a new issue