mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Allow retention of momentum when climbing off surfaces
This commit is contained in:
parent
741b2a4fad
commit
6f394319cc
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);
|
glidesector = R_IsPointInSubsector(player->mo->x + platx, player->mo->y + platy);
|
||||||
|
|
||||||
if (!glidesector || glidesector->sector != player->mo->subsector->sector)
|
|
||||||
{
|
{
|
||||||
boolean floorclimb = false;
|
boolean floorclimb = false;
|
||||||
boolean thrust = false;
|
boolean thrust = false;
|
||||||
|
|
@ -3458,9 +3457,13 @@ static void P_DoClimbing(player_t *player)
|
||||||
if (!floorclimb)
|
if (!floorclimb)
|
||||||
{
|
{
|
||||||
if (boostup)
|
if (boostup)
|
||||||
|
{
|
||||||
P_SetObjectMomZ(player->mo, 2*FRACUNIT, true);
|
P_SetObjectMomZ(player->mo, 2*FRACUNIT, true);
|
||||||
|
if (cmd->forwardmove)
|
||||||
|
P_SetObjectMomZ(player->mo, 2*player->mo->momz/3, false);
|
||||||
|
}
|
||||||
if (thrust)
|
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->climbing = 0;
|
||||||
player->pflags |= P_GetJumpFlags(player);
|
player->pflags |= P_GetJumpFlags(player);
|
||||||
|
|
@ -3474,12 +3477,6 @@ static void P_DoClimbing(player_t *player)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
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)
|
if (cmd->sidemove != 0 || cmd->forwardmove != 0)
|
||||||
climb = true;
|
climb = true;
|
||||||
|
|
@ -3498,7 +3495,7 @@ static void P_DoClimbing(player_t *player)
|
||||||
player->pflags |= P_GetJumpFlags(player);
|
player->pflags |= P_GetJumpFlags(player);
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
|
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))
|
if (!demoplayback || P_AnalogMove(player))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue