Buff tether in Battle

- /4 minimum distance
- x2 speed
This commit is contained in:
Sally Coolatta 2022-01-05 03:24:19 -05:00
parent 7613cabfae
commit bb53ee22be

View file

@ -1721,6 +1721,7 @@ static void K_UpdateDraft(player_t *player)
{
fixed_t topspd = K_GetKartSpeed(player, false);
fixed_t draftdistance;
fixed_t minDist;
UINT8 leniency;
UINT8 i;
@ -1740,6 +1741,13 @@ static void K_UpdateDraft(player_t *player)
draftdistance = FixedMul(draftdistance, K_GetKartGameSpeedScalar(gamespeed));
}
minDist = 640 * player->mo->scale;
if (gametype == GT_BATTLE)
{
// TODO: gametyperules
minDist /= 4;
}
// On the contrary, the leniency period biases toward high weight.
// (See also: the leniency variable in K_SpawnDraftDust)
leniency = (3*TICRATE)/4 + ((player->kartweight-1) * (TICRATE/4));
@ -1798,7 +1806,7 @@ static void K_UpdateDraft(player_t *player)
#ifndef EASYDRAFTTEST
// TOO close to draft.
if (dist < FixedMul(RING_DIST>>1, player->mo->scale))
if (dist < minDist)
continue;
// Not close enough to draft.
@ -2866,6 +2874,13 @@ static void K_GetKartBoostPower(player_t *player)
{
// 30% - 44%, each point of speed adds 1.75%
fixed_t draftspeed = ((3*FRACUNIT)/10) + ((player->kartspeed-1) * ((7*FRACUNIT)/400));
if (gametype == GT_BATTLE)
{
// TODO: gametyperules
draftspeed *= 2;
}
speedboost += FixedMul(draftspeed, player->draftpower); // (Drafting suffers no boost stack penalty.)
numboosts++;
}