mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
GP refinements
This commit is contained in:
parent
12bc1b9cca
commit
2459affaa3
5 changed files with 25 additions and 8 deletions
11
src/g_game.c
11
src/g_game.c
|
|
@ -1905,17 +1905,22 @@ void G_Ticker(boolean run)
|
|||
&& grandprixinfo.gp == true
|
||||
&& grandprixinfo.masterbots == false)
|
||||
{
|
||||
UINT8 bot_level_decrease = 3;
|
||||
UINT8 bot_level_decrease = 2;
|
||||
UINT8 min_lvl = 5;
|
||||
|
||||
if (grandprixinfo.gamespeed == KARTSPEED_EASY)
|
||||
{
|
||||
bot_level_decrease++;
|
||||
min_lvl = 1;
|
||||
}
|
||||
else if (grandprixinfo.gamespeed == KARTSPEED_HARD)
|
||||
{
|
||||
bot_level_decrease--;
|
||||
min_lvl = 9;
|
||||
}
|
||||
|
||||
boolean already_min_lvl = (players[i].botvars.difficulty >= min_lvl);
|
||||
|
||||
if (players[i].botvars.difficulty <= bot_level_decrease)
|
||||
{
|
||||
players[i].botvars.difficulty = 1;
|
||||
|
|
@ -1924,6 +1929,9 @@ void G_Ticker(boolean run)
|
|||
{
|
||||
players[i].botvars.difficulty -= bot_level_decrease;
|
||||
}
|
||||
|
||||
if (already_min_lvl)
|
||||
players[i].botvars.difficulty = max(players[i].botvars.difficulty, min_lvl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5852,6 +5860,7 @@ void G_SetRetryFlag(void)
|
|||
if (retrying == false && grandprixinfo.gp)
|
||||
{
|
||||
grandprixinfo.rank.continuesUsed++;
|
||||
grandprixinfo.rank.levels[grandprixinfo.rank.numLevels].continues++;
|
||||
}
|
||||
|
||||
retrying = true;
|
||||
|
|
|
|||
|
|
@ -611,12 +611,10 @@ void K_IncreaseBotDifficulty(player_t *bot)
|
|||
switch(averageRank)
|
||||
{
|
||||
case GRADE_E:
|
||||
rankNudge = -2;
|
||||
break;
|
||||
case GRADE_D:
|
||||
case GRADE_C:
|
||||
rankNudge = -1;
|
||||
break;
|
||||
case GRADE_C:
|
||||
case GRADE_B:
|
||||
rankNudge = 0;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -188,6 +188,10 @@ void podiumData_s::Init(void)
|
|||
|
||||
lvl->time = M_RandomRange(50*TICRATE, 210*TICRATE);
|
||||
|
||||
lvl->continues = 0;
|
||||
if (!M_RandomRange(0, 2))
|
||||
lvl->continues = M_RandomRange(1, 3);
|
||||
|
||||
for (INT32 j = 0; j < rank.numPlayers; j++)
|
||||
{
|
||||
gpRank_level_perplayer_t *const dta = &lvl->perPlayer[j];
|
||||
|
|
@ -633,10 +637,13 @@ void podiumData_s::Draw(void)
|
|||
|
||||
if (lvl->event != GPEVENT_SPECIAL && dta->grade != GRADE_INVALID)
|
||||
{
|
||||
drawer_rank
|
||||
.xy(0, -1)
|
||||
.colormap( static_cast<skincolornum_t>(K_GetGradeColor(dta->grade)) )
|
||||
.patch(va("R_CUPRN%c", K_GetGradeChar(dta->grade)));
|
||||
if (lvl->continues)
|
||||
drawer_rank.xy(2, 1).font(srb2::Draw::Font::kPing).colorize(SKINCOLOR_RED).text(va("-%d", lvl->continues));
|
||||
else
|
||||
drawer_rank
|
||||
.xy(0, -1)
|
||||
.colormap( static_cast<skincolornum_t>(K_GetGradeColor(dta->grade)) )
|
||||
.patch(va("R_CUPRN%c", K_GetGradeChar(dta->grade)));
|
||||
}
|
||||
|
||||
// Do not draw any stats for GAME OVERed player
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ struct gpRank_level_t
|
|||
UINT32 time;
|
||||
UINT16 totalExp;
|
||||
UINT16 totalPrisons;
|
||||
UINT16 continues;
|
||||
gpRank_level_perplayer_t perPlayer[MAXSPLITSCREENPLAYERS];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6416,6 +6416,7 @@ static inline void P_ArchiveMisc(savebuffer_t *save)
|
|||
WRITEUINT32(save->p, lvl->time);
|
||||
WRITEUINT16(save->p, lvl->totalExp);
|
||||
WRITEUINT16(save->p, lvl->totalPrisons);
|
||||
WRITEUINT16(save->p, lvl->continues);
|
||||
|
||||
UINT8 j;
|
||||
for (j = 0; j < rank->numPlayers; j++)
|
||||
|
|
@ -6704,6 +6705,7 @@ static boolean P_UnArchiveSPGame(savebuffer_t *save)
|
|||
lvl->time = READUINT32(save->p);
|
||||
lvl->totalExp = READUINT16(save->p);
|
||||
lvl->totalPrisons = READUINT16(save->p);
|
||||
lvl->continues = READUINT16(save->p);
|
||||
|
||||
for (j = 0; j < rank->numPlayers; j++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue