mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'tether-refinements' into 'master'
Bot tether refinements See merge request KartKrew/Kart!1975
This commit is contained in:
commit
2641ba2380
1 changed files with 11 additions and 6 deletions
17
src/k_kart.c
17
src/k_kart.c
|
|
@ -1410,6 +1410,14 @@ static boolean K_TryDraft(player_t *player, mobj_t *dest, fixed_t minDist, fixed
|
|||
}
|
||||
#endif
|
||||
|
||||
// Bots are unusually good at keeping their facing aligned on long, tight turns.
|
||||
// Force them to give up tether in these situations, like a drifting player typically would.
|
||||
UINT16 rejectThreshold = KART_FULLTURN/4;
|
||||
if (K_PlayerUsesBotMovement(player) && (abs(player->oldcmd.turning + player->cmd.turning) >= rejectThreshold))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
olddraft = player->draftpower;
|
||||
|
||||
player->draftleeway = leniency;
|
||||
|
|
@ -1504,12 +1512,9 @@ static void K_UpdateDraft(player_t *player)
|
|||
leniency *= 4;
|
||||
}
|
||||
|
||||
// Want to berserk attack? Get your speed FIRST.
|
||||
if (player->instaWhipCharge >= INSTAWHIP_TETHERBLOCK || player->defenseLockout)
|
||||
return;
|
||||
|
||||
// Not enough speed to draft.
|
||||
if (player->speed >= 20 * player->mo->scale)
|
||||
// You need speed and commitment to draft.
|
||||
if (player->speed >= 20 * player->mo->scale
|
||||
&& player->instaWhipCharge < INSTAWHIP_TETHERBLOCK && !player->defenseLockout)
|
||||
{
|
||||
if (addUfo != NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue