mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-23 16:32:36 +00:00
Merge branch 'roulette-speed-thing' into 'master'
Roulette speed thing See merge request KartKrew/Kart!819
This commit is contained in:
commit
7f9ac1e9e4
1 changed files with 3 additions and 3 deletions
|
|
@ -821,7 +821,7 @@ static void K_InitRoulette(itemroulette_t *const roulette)
|
||||||
roulette->secondToFirst = 0;
|
roulette->secondToFirst = 0;
|
||||||
|
|
||||||
roulette->elapsed = 0;
|
roulette->elapsed = 0;
|
||||||
roulette->tics = roulette->speed = ROULETTE_SPEED_FASTEST; // Some default speed
|
roulette->tics = roulette->speed = ROULETTE_SPEED_TIMEATTACK; // Some default speed
|
||||||
|
|
||||||
roulette->active = true;
|
roulette->active = true;
|
||||||
roulette->eggman = false;
|
roulette->eggman = false;
|
||||||
|
|
@ -981,7 +981,7 @@ static void K_CalculateRouletteSpeed(itemroulette_t *const roulette)
|
||||||
// Combine our two factors together.
|
// Combine our two factors together.
|
||||||
total = min(FRACUNIT, (frontRun / 2) + (progress / 2));
|
total = min(FRACUNIT, (frontRun / 2) + (progress / 2));
|
||||||
|
|
||||||
if (leveltime < starttime + 20*TICRATE)
|
if (leveltime < starttime + 30*TICRATE)
|
||||||
{
|
{
|
||||||
// Don't impact as much at the start.
|
// Don't impact as much at the start.
|
||||||
// This makes it so that everyone gets to enjoy the lowest speed at the start.
|
// This makes it so that everyone gets to enjoy the lowest speed at the start.
|
||||||
|
|
@ -991,7 +991,7 @@ static void K_CalculateRouletteSpeed(itemroulette_t *const roulette)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fixed_t lerp = FixedDiv(leveltime - starttime, 20*TICRATE);
|
const fixed_t lerp = FixedDiv(leveltime - starttime, 30*TICRATE);
|
||||||
total = FRACUNIT + FixedMul(lerp, total - FRACUNIT);
|
total = FRACUNIT + FixedMul(lerp, total - FRACUNIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue