mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Remove difficulty as a ranking requirement
Was a cute idea, but removing it since it's not something you can 100% guarantee every time, which was the same reasoning for getting rid of times getting damaged / dealing damage from the requirements.
This commit is contained in:
parent
3c07641938
commit
d5d0647ae6
5 changed files with 13 additions and 48 deletions
|
|
@ -4129,7 +4129,6 @@ static void G_DoCompleted(void)
|
||||||
wipegamestate = GS_NULL;
|
wipegamestate = GS_NULL;
|
||||||
|
|
||||||
g_gpRank.position = MAXPLAYERS;
|
g_gpRank.position = MAXPLAYERS;
|
||||||
g_gpRank.difficulty = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -4157,11 +4156,7 @@ static void G_DoCompleted(void)
|
||||||
|
|
||||||
G_PlayerFinishLevel(i); // take away cards and stuff
|
G_PlayerFinishLevel(i); // take away cards and stuff
|
||||||
|
|
||||||
if (players[i].bot)
|
if (players[i].bot == false)
|
||||||
{
|
|
||||||
g_gpRank.difficulty = max(g_gpRank.difficulty, players[i].botvars.difficulty);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
g_gpRank.position = min(g_gpRank.position, K_GetPodiumPosition(&players[i]));
|
g_gpRank.position = min(g_gpRank.position, K_GetPodiumPosition(&players[i]));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4833,8 +4833,6 @@ static void K_DrawGPRankDebugger(void)
|
||||||
V_DrawThinString(0, 50, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
V_DrawThinString(0, 50, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
||||||
va("RINGS: %d / %d", g_gpRank.rings, g_gpRank.totalRings));
|
va("RINGS: %d / %d", g_gpRank.rings, g_gpRank.totalRings));
|
||||||
V_DrawThinString(0, 60, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
V_DrawThinString(0, 60, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
||||||
va("DIFFICULTY: %d / %d", g_gpRank.difficulty, g_gpRank.difficultyTarget));
|
|
||||||
V_DrawThinString(0, 70, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
|
||||||
va("EMERALD: %s", (g_gpRank.specialWon == true) ? "YES" : "NO"));
|
va("EMERALD: %s", (g_gpRank.specialWon == true) ? "YES" : "NO"));
|
||||||
|
|
||||||
switch (grade)
|
switch (grade)
|
||||||
|
|
@ -4848,7 +4846,7 @@ static void K_DrawGPRankDebugger(void)
|
||||||
default: { break; }
|
default: { break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawThinString(0, 90, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE|V_YELLOWMAP,
|
V_DrawThinString(0, 80, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE|V_YELLOWMAP,
|
||||||
va(" ** FINAL GRADE: %c", gradeChar));
|
va(" ** FINAL GRADE: %c", gradeChar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ static struct podiumData_s
|
||||||
UINT8 fade;
|
UINT8 fade;
|
||||||
} podiumData;
|
} podiumData;
|
||||||
|
|
||||||
#define PODIUM_STATES (10) // TODO: enum when this actually gets made
|
#define PODIUM_STATES (9) // TODO: enum when this actually gets made
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
boolean K_PodiumSequence(void)
|
boolean K_PodiumSequence(void)
|
||||||
|
|
@ -470,29 +470,22 @@ void K_CeremonyDrawer(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
{
|
|
||||||
V_DrawString(x, y, V_ALLOWLOWERCASE,
|
|
||||||
va("DIFFICULTY: %d / %d", podiumData.rankData.difficulty, podiumData.rankData.difficultyTarget)
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 8:
|
|
||||||
{
|
{
|
||||||
V_DrawString(x, y, V_ALLOWLOWERCASE,
|
V_DrawString(x, y, V_ALLOWLOWERCASE,
|
||||||
va("EMERALD: %s", (podiumData.rankData.specialWon == true) ? "YES" : "NO")
|
va("EMERALD: %s", (podiumData.rankData.specialWon == true) ? "YES" : "NO")
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 9:
|
case 8:
|
||||||
{
|
{
|
||||||
V_DrawString(x, y + 10, V_YELLOWMAP|V_ALLOWLOWERCASE,
|
V_DrawString(x, y + 10, V_YELLOWMAP|V_ALLOWLOWERCASE,
|
||||||
va(" ** FINAL GRADE: %c", gradeChar)
|
va(" ** FINAL GRADE: %c", gradeChar)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 10:
|
case 9:
|
||||||
{
|
{
|
||||||
V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, BASEVIDHEIGHT - 10, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
V_DrawThinString(2, BASEVIDHEIGHT - 10, V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
|
||||||
"Press some button type deal to continue"
|
"Press some button type deal to continue"
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
32
src/k_rank.c
32
src/k_rank.c
|
|
@ -68,18 +68,6 @@ void K_InitGrandPrixRank(gpRank_t *rankData)
|
||||||
|
|
||||||
rankData->totalRings = grandprixinfo.cup->numlevels * numHumans * 20;
|
rankData->totalRings = grandprixinfo.cup->numlevels * numHumans * 20;
|
||||||
|
|
||||||
if (grandprixinfo.masterbots == true)
|
|
||||||
{
|
|
||||||
rankData->difficultyTarget = MAXBOTDIFFICULTY;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rankData->difficultyTarget = min(
|
|
||||||
MAXBOTDIFFICULTY,
|
|
||||||
K_BotStartingDifficulty(grandprixinfo.gamespeed) + ((grandprixinfo.cup->numlevels + 1) / 2)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < grandprixinfo.cup->numlevels; i++)
|
for (i = 0; i < grandprixinfo.cup->numlevels; i++)
|
||||||
{
|
{
|
||||||
const INT32 cupLevelNum = grandprixinfo.cup->cachedlevels[i];
|
const INT32 cupLevelNum = grandprixinfo.cup->cachedlevels[i];
|
||||||
|
|
@ -114,14 +102,13 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
|
|
||||||
gp_rank_e retGrade = GRADE_E;
|
gp_rank_e retGrade = GRADE_E;
|
||||||
|
|
||||||
const INT32 positionWeight = 1500;
|
const INT32 positionWeight = 150;
|
||||||
const INT32 pointsWeight = 1000;
|
const INT32 pointsWeight = 100;
|
||||||
const INT32 lapsWeight = 1000;
|
const INT32 lapsWeight = 100;
|
||||||
const INT32 capsulesWeight = 1000;
|
const INT32 capsulesWeight = 100;
|
||||||
const INT32 ringsWeight = 500;
|
const INT32 ringsWeight = 50;
|
||||||
const INT32 difficultyWeight = 200;
|
const INT32 total = positionWeight + pointsWeight + lapsWeight + capsulesWeight + ringsWeight;
|
||||||
const INT32 total = positionWeight + pointsWeight + lapsWeight + capsulesWeight + ringsWeight + difficultyWeight;
|
const INT32 continuesPenalty = 20;
|
||||||
const INT32 continuesPenalty = 200;
|
|
||||||
|
|
||||||
INT32 ours = 0;
|
INT32 ours = 0;
|
||||||
fixed_t percent = 0;
|
fixed_t percent = 0;
|
||||||
|
|
@ -153,11 +140,6 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
||||||
ours += (rankData->rings * ringsWeight) / rankData->totalRings;
|
ours += (rankData->rings * ringsWeight) / rankData->totalRings;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rankData->difficultyTarget > 0)
|
|
||||||
{
|
|
||||||
ours += (rankData->difficulty * difficultyWeight) / rankData->difficultyTarget;
|
|
||||||
}
|
|
||||||
|
|
||||||
ours -= rankData->continuesUsed * continuesPenalty;
|
ours -= rankData->continuesUsed * continuesPenalty;
|
||||||
|
|
||||||
percent = FixedDiv(ours, total);
|
percent = FixedDiv(ours, total);
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,6 @@ struct gpRank_t
|
||||||
UINT32 rings;
|
UINT32 rings;
|
||||||
UINT32 totalRings;
|
UINT32 totalRings;
|
||||||
|
|
||||||
UINT8 difficulty;
|
|
||||||
UINT8 difficultyTarget;
|
|
||||||
|
|
||||||
boolean specialWon;
|
boolean specialWon;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue