mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reduce spacing between bots
This commit is contained in:
parent
24b0c3afd6
commit
482141a95f
1 changed files with 4 additions and 8 deletions
12
src/k_bot.c
12
src/k_bot.c
|
|
@ -207,9 +207,8 @@ boolean K_BotCanTakeCut(player_t *player)
|
||||||
|
|
||||||
static UINT32 K_BotRubberbandDistance(player_t *player)
|
static UINT32 K_BotRubberbandDistance(player_t *player)
|
||||||
{
|
{
|
||||||
const UINT32 spacing = 1024;
|
const UINT32 spacing = FixedDiv(512 * FRACUNIT, K_GetKartGameSpeedScalar(gamespeed)) / FRACUNIT;
|
||||||
const UINT8 portpriority = player - players;
|
const UINT8 portpriority = player - players;
|
||||||
UINT32 dist = 0;
|
|
||||||
UINT8 pos = 0;
|
UINT8 pos = 0;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
|
|
@ -238,10 +237,7 @@ static UINT32 K_BotRubberbandDistance(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dist = (pos * spacing);
|
return (pos * spacing);
|
||||||
dist = FixedDiv(dist * FRACUNIT, K_GetKartGameSpeedScalar(gamespeed)) / FRACUNIT;
|
|
||||||
|
|
||||||
return dist;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t K_BotRubberband(player_t *player)
|
fixed_t K_BotRubberband(player_t *player)
|
||||||
|
|
@ -280,8 +276,8 @@ fixed_t K_BotRubberband(player_t *player)
|
||||||
|
|
||||||
if (wanteddist > player->distancetofinish)
|
if (wanteddist > player->distancetofinish)
|
||||||
{
|
{
|
||||||
// Whoa, you're too far ahead!
|
// Whoa, you're too far ahead! Slow back down a little.
|
||||||
rubberband += (MAXBOTDIFFICULTY - player->botvars.difficulty) * distdiff;
|
rubberband += (MAXBOTDIFFICULTY - player->botvars.difficulty) * (distdiff / 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue