mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'rank-preserve' into 'master'
Don't count Sealed Star continues into final rank See merge request kart-krew-dev/ring-racers-internal!2862
This commit is contained in:
commit
e039edb7f2
2 changed files with 16 additions and 2 deletions
|
|
@ -5909,7 +5909,8 @@ void G_SetRetryFlag(void)
|
||||||
{
|
{
|
||||||
if (retrying == false && grandprixinfo.gp)
|
if (retrying == false && grandprixinfo.gp)
|
||||||
{
|
{
|
||||||
grandprixinfo.rank.continuesUsed++;
|
if (!specialstageinfo.valid)
|
||||||
|
grandprixinfo.rank.continuesUsed++;
|
||||||
grandprixinfo.rank.levels[grandprixinfo.rank.numLevels].continues++;
|
grandprixinfo.rank.levels[grandprixinfo.rank.numLevels].continues++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -562,6 +562,7 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fixed_t percent = K_CalculateGPPercent(rankData);
|
fixed_t percent = K_CalculateGPPercent(rankData);
|
||||||
|
|
||||||
static const fixed_t gradePercents[GRADE_A] = {
|
static const fixed_t gradePercents[GRADE_A] = {
|
||||||
|
|
@ -571,6 +572,18 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
17*FRACUNIT/20 // A: 85% or higher
|
17*FRACUNIT/20 // A: 85% or higher
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fixed_t upgraderequirement = 370*FRACUNIT/400;
|
||||||
|
|
||||||
|
// If our last map was Special, check for "uncredited" continues to offset the rank bump.
|
||||||
|
fixed_t hiddenpercent = percent;
|
||||||
|
gpRank_level_t *lastgrade = &rankData->levels[rankData->numLevels - 1];
|
||||||
|
UINT32 id = lastgrade->id;
|
||||||
|
|
||||||
|
if (rankData->specialWon && (mapheaderinfo[id-1]->typeoflevel & G_TOLFlag(GT_SPECIAL)))
|
||||||
|
{
|
||||||
|
hiddenpercent -= FRACUNIT / RANK_CONTINUE_PENALTY_DIV * lastgrade->continues;
|
||||||
|
}
|
||||||
|
|
||||||
for (retGrade = GRADE_E; retGrade < GRADE_A; retGrade++)
|
for (retGrade = GRADE_E; retGrade < GRADE_A; retGrade++)
|
||||||
{
|
{
|
||||||
if (percent < gradePercents[retGrade])
|
if (percent < gradePercents[retGrade])
|
||||||
|
|
@ -579,7 +592,7 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rankData->specialWon == true)
|
if (rankData->specialWon == true && hiddenpercent >= upgraderequirement)
|
||||||
{
|
{
|
||||||
// Winning the Special Stage gives you
|
// Winning the Special Stage gives you
|
||||||
// a free grade increase.
|
// a free grade increase.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue