mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Buff tether in Battle
- /4 minimum distance - x2 speed
This commit is contained in:
parent
9e5b70ad8f
commit
21c42c3d79
1 changed files with 16 additions and 1 deletions
17
src/k_kart.c
17
src/k_kart.c
|
|
@ -1721,6 +1721,7 @@ static void K_UpdateDraft(player_t *player)
|
||||||
{
|
{
|
||||||
fixed_t topspd = K_GetKartSpeed(player, false);
|
fixed_t topspd = K_GetKartSpeed(player, false);
|
||||||
fixed_t draftdistance;
|
fixed_t draftdistance;
|
||||||
|
fixed_t minDist;
|
||||||
UINT8 leniency;
|
UINT8 leniency;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
|
|
@ -1740,6 +1741,13 @@ static void K_UpdateDraft(player_t *player)
|
||||||
draftdistance = FixedMul(draftdistance, K_GetKartGameSpeedScalar(gamespeed));
|
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.
|
// On the contrary, the leniency period biases toward high weight.
|
||||||
// (See also: the leniency variable in K_SpawnDraftDust)
|
// (See also: the leniency variable in K_SpawnDraftDust)
|
||||||
leniency = (3*TICRATE)/4 + ((player->kartweight-1) * (TICRATE/4));
|
leniency = (3*TICRATE)/4 + ((player->kartweight-1) * (TICRATE/4));
|
||||||
|
|
@ -1798,7 +1806,7 @@ static void K_UpdateDraft(player_t *player)
|
||||||
|
|
||||||
#ifndef EASYDRAFTTEST
|
#ifndef EASYDRAFTTEST
|
||||||
// TOO close to draft.
|
// TOO close to draft.
|
||||||
if (dist < FixedMul(RING_DIST>>1, player->mo->scale))
|
if (dist < minDist)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Not close enough to draft.
|
// 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%
|
// 30% - 44%, each point of speed adds 1.75%
|
||||||
fixed_t draftspeed = ((3*FRACUNIT)/10) + ((player->kartspeed-1) * ((7*FRACUNIT)/400));
|
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.)
|
speedboost += FixedMul(draftspeed, player->draftpower); // (Drafting suffers no boost stack penalty.)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue