mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Higher Sealed Star entry reqs for first entry
This commit is contained in:
parent
f61e98c1a8
commit
c7e07576f8
5 changed files with 23 additions and 17 deletions
|
|
@ -198,8 +198,6 @@ typedef enum
|
||||||
GRADE_S
|
GRADE_S
|
||||||
} gp_rank_e;
|
} gp_rank_e;
|
||||||
|
|
||||||
#define SEALED_STAR_ENTRY (355*FRACUNIT/400)
|
|
||||||
|
|
||||||
struct cupwindata_t
|
struct cupwindata_t
|
||||||
{
|
{
|
||||||
UINT8 best_placement;
|
UINT8 best_placement;
|
||||||
|
|
|
||||||
|
|
@ -4421,7 +4421,7 @@ void G_GetNextMap(void)
|
||||||
&& grandprixinfo.gamespeed >= KARTSPEED_NORMAL)
|
&& grandprixinfo.gamespeed >= KARTSPEED_NORMAL)
|
||||||
{
|
{
|
||||||
// On A rank pace? Then you get a chance for S rank!
|
// On A rank pace? Then you get a chance for S rank!
|
||||||
permitrank = (K_CalculateGPPercent(&grandprixinfo.rank) >= SEALED_STAR_ENTRY);
|
permitrank = (K_CalculateGPPercent(&grandprixinfo.rank) >= K_SealedStarEntryRequirement(&grandprixinfo.rank));
|
||||||
|
|
||||||
// If you're on Master, a win floats you to rank-restricted levels for free.
|
// If you're on Master, a win floats you to rank-restricted levels for free.
|
||||||
// (This is a different class of challenge!)
|
// (This is a different class of challenge!)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include "k_race.h"
|
#include "k_race.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "k_objects.h"
|
#include "k_objects.h"
|
||||||
|
#include "m_cond.h"
|
||||||
|
|
||||||
// I was ALMOST tempted to start tearing apart all
|
// I was ALMOST tempted to start tearing apart all
|
||||||
// of the map loading code and turning it into C++
|
// of the map loading code and turning it into C++
|
||||||
|
|
@ -311,7 +312,7 @@ void gpRank_t::Init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate players
|
// Calculate players
|
||||||
numPlayers = numHumans;
|
numPlayers = numHumans;
|
||||||
totalPlayers = K_GetGPPlayerCount(numHumans);
|
totalPlayers = K_GetGPPlayerCount(numHumans);
|
||||||
|
|
||||||
|
|
@ -588,6 +589,19 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
return static_cast<gp_rank_e>(retGrade);
|
return static_cast<gp_rank_e>(retGrade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fixed_t K_SealedStarEntryRequirement(gpRank_t *rankData)
|
||||||
|
{
|
||||||
|
fixed_t entry = 370*FRACUNIT/400;
|
||||||
|
|
||||||
|
if (gamedata->everseenspecial)
|
||||||
|
entry -= 350*FRACUNIT/400;
|
||||||
|
|
||||||
|
if (grandprixinfo.masterbots && grandprixinfo.rank.position <= 1)
|
||||||
|
entry = K_CalculateGPPercent(rankData);
|
||||||
|
|
||||||
|
return entry;
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
|
|
||||||
|
|
@ -638,10 +652,10 @@ fixed_t K_CalculateGPPercent(gpRank_t *rankData)
|
||||||
|
|
||||||
rankData->scoreContinues -= (rankData->continuesUsed - RANK_CONTINUE_PENALTY_START) * continuesPenalty;
|
rankData->scoreContinues -= (rankData->continuesUsed - RANK_CONTINUE_PENALTY_START) * continuesPenalty;
|
||||||
|
|
||||||
rankData->scoreTotal =
|
rankData->scoreTotal =
|
||||||
rankData->scorePosition +
|
rankData->scorePosition +
|
||||||
// rankData->scoreGPPoints +
|
// rankData->scoreGPPoints +
|
||||||
rankData->scoreExp +
|
rankData->scoreExp +
|
||||||
rankData->scorePrisons +
|
rankData->scorePrisons +
|
||||||
rankData->scoreRings +
|
rankData->scoreRings +
|
||||||
rankData->scoreContinues;
|
rankData->scoreContinues;
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,7 @@ void K_UpdateGPRank(gpRank_t *rankData);
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
|
|
||||||
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData);
|
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData);
|
||||||
|
fixed_t K_SealedStarEntryRequirement(gpRank_t *rankData);
|
||||||
fixed_t K_CalculateGPPercent(gpRank_t *rankData);
|
fixed_t K_CalculateGPPercent(gpRank_t *rankData);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -398,21 +398,14 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
||||||
{
|
{
|
||||||
// On A rank pace? Then you get a chance for S rank!
|
// On A rank pace? Then you get a chance for S rank!
|
||||||
fixed_t rankforline = K_CalculateGPPercent(&grandprixinfo.rank);
|
fixed_t rankforline = K_CalculateGPPercent(&grandprixinfo.rank);
|
||||||
|
fixed_t required = K_SealedStarEntryRequirement(&grandprixinfo.rank);
|
||||||
|
|
||||||
data.showrank = (rankforline >= SEALED_STAR_ENTRY);
|
data.showrank = (rankforline >= required);
|
||||||
|
|
||||||
data.linemeter =
|
data.linemeter =
|
||||||
(std::min(rankforline, SEALED_STAR_ENTRY)
|
(std::min(rankforline, required)
|
||||||
* (2 * TICRATE)
|
* (2 * TICRATE)
|
||||||
) / SEALED_STAR_ENTRY;
|
) / required;
|
||||||
|
|
||||||
// G_NextMap will float you to rank-restricted stages on Master wins.
|
|
||||||
// Fudge the rank display.
|
|
||||||
if (grandprixinfo.masterbots && grandprixinfo.rank.position <= 1)
|
|
||||||
{
|
|
||||||
data.showrank = true;
|
|
||||||
data.linemeter = 2*TICRATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A little extra time to take it all in
|
// A little extra time to take it all in
|
||||||
timer += TICRATE;
|
timer += TICRATE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue