mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reduce turning for bots when they stair jank
This commit is contained in:
parent
4a34eb5e96
commit
a6d1043d17
1 changed files with 4 additions and 1 deletions
|
|
@ -662,7 +662,10 @@ fixed_t K_DistanceOfLineFromPoint(fixed_t v1x, fixed_t v1y, fixed_t v2x, fixed_t
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static botprediction_t *K_CreateBotPrediction(player_t *player)
|
static botprediction_t *K_CreateBotPrediction(player_t *player)
|
||||||
{
|
{
|
||||||
const INT16 handling = K_GetKartTurnValue(player, KART_FULLTURN); // Reduce prediction based on how fast you can turn
|
// Stair janking makes it harder to steer, so attempt to steer harder.
|
||||||
|
const UINT8 jankDiv = (player->stairjank > 0 ? 2 : 1);
|
||||||
|
|
||||||
|
const INT16 handling = K_GetKartTurnValue(player, KART_FULLTURN) / jankDiv; // Reduce prediction based on how fast you can turn
|
||||||
const INT16 normal = KART_FULLTURN; // "Standard" handling to compare to
|
const INT16 normal = KART_FULLTURN; // "Standard" handling to compare to
|
||||||
|
|
||||||
const tic_t futuresight = (TICRATE * normal) / max(1, handling); // How far ahead into the future to try and predict
|
const tic_t futuresight = (TICRATE * normal) / max(1, handling); // How far ahead into the future to try and predict
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue