mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
Allow retention of momentum when climbing off surfaces
This commit is contained in:
parent
906a2b1f59
commit
c72b5d8a49
1 changed files with 6 additions and 9 deletions
15
src/p_user.c
15
src/p_user.c
|
@ -3074,7 +3074,6 @@ static void P_DoClimbing(player_t *player)
|
|||
|
||||
glidesector = R_IsPointInSubsector(player->mo->x + platx, player->mo->y + platy);
|
||||
|
||||
if (!glidesector || glidesector->sector != player->mo->subsector->sector)
|
||||
{
|
||||
boolean floorclimb = false;
|
||||
boolean thrust = false;
|
||||
|
@ -3458,9 +3457,13 @@ static void P_DoClimbing(player_t *player)
|
|||
if (!floorclimb)
|
||||
{
|
||||
if (boostup)
|
||||
{
|
||||
P_SetObjectMomZ(player->mo, 2*FRACUNIT, true);
|
||||
if (cmd->forwardmove)
|
||||
P_SetObjectMomZ(player->mo, 2*player->mo->momz/3, false);
|
||||
}
|
||||
if (thrust)
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(4*FRACUNIT, player->mo->scale)); // Lil' boost up.
|
||||
P_Thrust(player->mo, player->mo->angle, FixedMul(4*FRACUNIT, player->mo->scale)); // Lil' boost up.
|
||||
|
||||
player->climbing = 0;
|
||||
player->pflags |= P_GetJumpFlags(player);
|
||||
|
@ -3474,12 +3477,6 @@ static void P_DoClimbing(player_t *player)
|
|||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= P_GetJumpFlags(player);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
|
||||
if (cmd->sidemove != 0 || cmd->forwardmove != 0)
|
||||
climb = true;
|
||||
|
@ -3498,7 +3495,7 @@ static void P_DoClimbing(player_t *player)
|
|||
player->pflags |= P_GetJumpFlags(player);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||
P_Thrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||
}
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
|
|
Loading…
Reference in a new issue