mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'versus-tidy' into 'master'
Versus Tidy See merge request KartKrew/Kart!1186
This commit is contained in:
commit
2d169202f2
3 changed files with 21 additions and 8 deletions
|
|
@ -582,8 +582,8 @@ enum TypeOfLevel
|
||||||
// Gametypes
|
// Gametypes
|
||||||
TOL_RACE = 0x0001, ///< Race
|
TOL_RACE = 0x0001, ///< Race
|
||||||
TOL_BATTLE = 0x0002, ///< Battle
|
TOL_BATTLE = 0x0002, ///< Battle
|
||||||
TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden)
|
TOL_SPECIAL = 0x0004, ///< Special Stage (variant of race, but forbidden)
|
||||||
TOL_SPECIAL = 0x0008, ///< Special Stage (variant of race, but forbidden)
|
TOL_VERSUS = 0x0008, ///< Versus (variant of battle, but forbidden)
|
||||||
TOL_TUTORIAL = 0x0010, ///< Tutorial (variant of race, but forbidden)
|
TOL_TUTORIAL = 0x0010, ///< Tutorial (variant of race, but forbidden)
|
||||||
|
|
||||||
// Modifiers
|
// Modifiers
|
||||||
|
|
|
||||||
|
|
@ -3392,7 +3392,7 @@ static gametype_t defaultgametypes[] =
|
||||||
"Versus",
|
"Versus",
|
||||||
"GT_VERSUS",
|
"GT_VERSUS",
|
||||||
GTR_BOSS|GTR_SPHERES|GTR_BUMPERS|GTR_POINTLIMIT|GTR_CLOSERPLAYERS|GTR_NOCUPSELECT|GTR_ENCORE,
|
GTR_BOSS|GTR_SPHERES|GTR_BUMPERS|GTR_POINTLIMIT|GTR_CLOSERPLAYERS|GTR_NOCUPSELECT|GTR_ENCORE,
|
||||||
TOL_BOSS,
|
TOL_VERSUS,
|
||||||
int_scoreortimeattack,
|
int_scoreortimeattack,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
@ -3550,8 +3550,8 @@ char *G_PrepareGametypeConstant(const char *newgtconst)
|
||||||
tolinfo_t TYPEOFLEVEL[NUMTOLNAMES] = {
|
tolinfo_t TYPEOFLEVEL[NUMTOLNAMES] = {
|
||||||
{"RACE",TOL_RACE},
|
{"RACE",TOL_RACE},
|
||||||
{"BATTLE",TOL_BATTLE},
|
{"BATTLE",TOL_BATTLE},
|
||||||
{"BOSS",TOL_BOSS},
|
|
||||||
{"SPECIAL",TOL_SPECIAL},
|
{"SPECIAL",TOL_SPECIAL},
|
||||||
|
{"VERSUS",TOL_VERSUS},
|
||||||
{"TUTORIAL",TOL_TUTORIAL},
|
{"TUTORIAL",TOL_TUTORIAL},
|
||||||
{"TV",TOL_TV},
|
{"TV",TOL_TV},
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
|
|
|
||||||
|
|
@ -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] =
|
||||||
{
|
{
|
||||||
|
|
@ -205,11 +206,15 @@ static kartitems_t K_KartItemReelBreakTheCapsules[] =
|
||||||
|
|
||||||
static kartitems_t K_KartItemReelBoss[] =
|
static kartitems_t K_KartItemReelBoss[] =
|
||||||
{
|
{
|
||||||
KITEM_ORBINAUT,
|
|
||||||
KITEM_BANANA,
|
|
||||||
KITEM_ORBINAUT,
|
|
||||||
KITEM_BANANA,
|
|
||||||
KITEM_GACHABOM,
|
KITEM_GACHABOM,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_GACHABOM,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
KITEM_NONE
|
KITEM_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1131,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