mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-19 03:51:34 +00:00
Slightly reduce high strength boosts in G1 race
This commit is contained in:
parent
ee1d571c08
commit
efeee381f8
1 changed files with 12 additions and 1 deletions
13
src/k_kart.c
13
src/k_kart.c
|
|
@ -3558,10 +3558,14 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
// Light weights have stronger boost stacking -- aka, better metabolism than heavies XD
|
||||
const fixed_t maxmetabolismincrease = FRACUNIT/2;
|
||||
fixed_t metabolism = FRACUNIT - ((9-player->kartweight) * maxmetabolismincrease / 8);
|
||||
fixed_t softboostcap = 0;
|
||||
fixed_t boostcapfactor = 3*FRACUNIT/4;
|
||||
|
||||
if (gamespeed == KARTSPEED_EASY && gametype != GT_TUTORIAL)
|
||||
{
|
||||
metabolism *= 2;
|
||||
|
||||
softboostcap = FRACUNIT/2;
|
||||
}
|
||||
|
||||
fixed_t boostpower = FRACUNIT;
|
||||
fixed_t speedboost = 0, accelboost = 0, handleboost = 0;
|
||||
|
|
@ -3870,6 +3874,13 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
|
||||
player->boostpower = boostpower;
|
||||
|
||||
// G1 race: Reduce high boosts
|
||||
if (softboostcap && speedboost > softboostcap)
|
||||
{
|
||||
fixed_t leftover = speedboost - softboostcap;
|
||||
speedboost = softboostcap + FixedMul(leftover, boostcapfactor);
|
||||
}
|
||||
|
||||
// value smoothing
|
||||
if (speedboost > player->speedboost)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue