mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Versus roulette: Speed up based on boss healthbar (destination) fill %
This commit is contained in:
parent
fdd5ee8dfc
commit
5c60a0958f
1 changed files with 9 additions and 0 deletions
|
|
@ -73,6 +73,7 @@
|
||||||
#define ROULETTE_SPEED_FASTEST (2)
|
#define ROULETTE_SPEED_FASTEST (2)
|
||||||
#define ROULETTE_SPEED_DIST (150*DISTVAR)
|
#define ROULETTE_SPEED_DIST (150*DISTVAR)
|
||||||
#define ROULETTE_SPEED_TIMEATTACK (9)
|
#define ROULETTE_SPEED_TIMEATTACK (9)
|
||||||
|
#define ROULETTE_SPEED_VERSUS_SLOWEST (12)
|
||||||
|
|
||||||
static UINT8 K_KartItemOddsRace[NUMKARTRESULTS-1][8] =
|
static UINT8 K_KartItemOddsRace[NUMKARTRESULTS-1][8] =
|
||||||
{
|
{
|
||||||
|
|
@ -1135,6 +1136,14 @@ static void K_CalculateRouletteSpeed(itemroulette_t *const roulette)
|
||||||
fixed_t progress = 0;
|
fixed_t progress = 0;
|
||||||
fixed_t total = 0;
|
fixed_t total = 0;
|
||||||
|
|
||||||
|
if (bossinfo.valid == true)
|
||||||
|
{
|
||||||
|
// Boss in action, use a speed controlled by boss health
|
||||||
|
total = FixedDiv(bossinfo.healthbar, BOSSHEALTHBARLEN);
|
||||||
|
roulette->tics = roulette->speed = ROULETTE_SPEED_FASTEST + FixedMul(ROULETTE_SPEED_VERSUS_SLOWEST - ROULETTE_SPEED_FASTEST, total);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (K_TimeAttackRules() == true)
|
if (K_TimeAttackRules() == true)
|
||||||
{
|
{
|
||||||
// Time Attack rules; use a consistent speed.
|
// Time Attack rules; use a consistent speed.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue