Fix underwater strafing activating below minimum speed and pushing you backward

- Below 11 FU, strafing is not supposed to kick in
- But the order of operations looked weird, and it seems
  to have been kicking in erroneously as a result
  - This would push the player in the opposite of their
    facing angle when they tried to drive forward and turn
    at the same time
  - Strong enough offroad is required to trigger this
This commit is contained in:
James R 2024-03-08 07:57:22 -08:00
parent 266e36928b
commit ad6b57ea26

View file

@ -10176,7 +10176,7 @@ static fixed_t K_GetUnderwaterStrafeMul(const player_t *player)
baseline = 2 * K_GetKartSpeed(player, true, true) / 3;
return max(0, FixedDiv(player->speed - minSpeed, baseline - minSpeed));
return max(0, FixedDiv(max(player->speed, minSpeed) - minSpeed, baseline - minSpeed));
}
INT16 K_GetKartTurnValue(const player_t *player, INT16 turnvalue)