mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Award full neutral drift boost even when mispredicting neutral turns
This commit is contained in:
parent
9a7fbc3320
commit
f914d51d5c
1 changed files with 7 additions and 0 deletions
|
|
@ -3654,9 +3654,16 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
// I dunno if this is overkill because turning is already stat-based.
|
||||
// Should this be a pure constant instead?
|
||||
const INT16 max_steer_threshold = (KART_FULLTURN * 5) / 6;
|
||||
|
||||
// Even when not inputting a turn, drift prediction is hard.
|
||||
// Turn solver will sometimes need to slightly turn to stay "aligned".
|
||||
// Award full boost even if turn solver creates a fractional miniturn.
|
||||
const INT16 inner_deadzone = KART_FULLTURN / 100;
|
||||
|
||||
INT32 steer_threshold = FixedMul((FRACUNIT * player->kartweight) / 9, max_steer_threshold);
|
||||
|
||||
INT32 steering = abs(player->steering);
|
||||
steering = max(steering - inner_deadzone, 0);
|
||||
|
||||
fixed_t frac = 0;
|
||||
if (steering < steer_threshold)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue