Fix being able to reverse in the air
This commit is contained in:
parent
fd8917092e
commit
616941841c
3 changed files with 5 additions and 7 deletions
|
|
@ -3598,9 +3598,6 @@ fixed_t K_GetNewSpeed(player_t *player)
|
|||
const fixed_t p_speed = K_GetKartSpeed(player, true, true);
|
||||
fixed_t p_accel = K_GetKartAccel(player);
|
||||
fixed_t newspeed, oldspeed, finalspeed;
|
||||
boolean onground = (P_IsObjectOnGround(player->mo) || (player->pogospring));
|
||||
|
||||
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
|
||||
|
||||
if (K_PlayerUsesBotMovement(player) == true && player->botvars.rubberband > 0)
|
||||
{
|
||||
|
|
@ -3635,12 +3632,13 @@ fixed_t K_GetNewSpeed(player_t *player)
|
|||
return finalspeed;
|
||||
}
|
||||
|
||||
fixed_t K_3dKartMovement(player_t *player)
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground)
|
||||
{
|
||||
fixed_t finalspeed = K_GetNewSpeed(player);
|
||||
|
||||
SINT8 forwardmove = K_GetForwardMove(player);
|
||||
|
||||
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
|
||||
|
||||
// forwardmove is:
|
||||
// 50 while accelerating,
|
||||
// 25 while clutching,
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ boolean K_KartKickstart(player_t *player);
|
|||
UINT16 K_GetKartButtons(player_t *player);
|
||||
SINT8 K_GetForwardMove(player_t *player);
|
||||
fixed_t K_GetNewSpeed(player_t *player);
|
||||
fixed_t K_3dKartMovement(player_t *player);
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground);
|
||||
SINT8 K_Sliptiding(player_t *player);
|
||||
void K_MoveKartPlayer(player_t *player, boolean onground);
|
||||
void K_CheckSpectateStatus(boolean considermapreset);
|
||||
|
|
|
|||
|
|
@ -1829,7 +1829,7 @@ static void P_3dMovement(player_t *player)
|
|||
// Forward movement
|
||||
if (!((player->exiting || mapreset) || (P_PlayerInPain(player) && !onground)))
|
||||
{
|
||||
movepushforward = K_3dKartMovement(player);
|
||||
movepushforward = K_3dKartMovement(player, onground);
|
||||
|
||||
// allow very small movement while in air for gameplay
|
||||
if (!onground)
|
||||
|
|
|
|||
Loading…
Reference in a new issue