diff --git a/src/g_game.c b/src/g_game.c index 850bdace5..b8f4d7725 100644 --- a/src/g_game.c +++ b/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; diff --git a/src/k_grandprix.cpp b/src/k_grandprix.cpp index 24a197f39..a636b5896 100644 --- a/src/k_grandprix.cpp +++ b/src/k_grandprix.cpp @@ -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; diff --git a/src/k_podium.cpp b/src/k_podium.cpp index 9797f58ba..603de82dc 100644 --- a/src/k_podium.cpp +++ b/src/k_podium.cpp @@ -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(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(K_GetGradeColor(dta->grade)) ) + .patch(va("R_CUPRN%c", K_GetGradeChar(dta->grade))); } // Do not draw any stats for GAME OVERed player diff --git a/src/k_rank.h b/src/k_rank.h index 4f36d12df..e801da037 100644 --- a/src/k_rank.h +++ b/src/k_rank.h @@ -34,6 +34,7 @@ struct gpRank_level_t UINT32 time; UINT16 totalExp; UINT16 totalPrisons; + UINT16 continues; gpRank_level_perplayer_t perPlayer[MAXSPLITSCREENPLAYERS]; }; diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 5bdd0e338..f00daaac8 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -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++) {