From 2989d3564efd643432972bf9088738f9a501c66f Mon Sep 17 00:00:00 2001 From: FreakyMutantMan Date: Tue, 30 Sep 2025 21:22:57 -0700 Subject: [PATCH] Add check to GP_GPCupIntoRoundQueue to ensure maps with both Race and Battle TOL flags are properly accounted for in bonus game queue. --- src/g_game.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index ba93a32ea..8a2bcd583 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4202,6 +4202,7 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor UINT8 i, levelindex = 0, bonusindex = 0; UINT8 bonusmodulo = max(1, (cup->numlevels+1)/(cup->numbonus+1)); UINT16 cupLevelNum; + INT32 bonusgt; // Levels are added to the queue in the following pattern. // For 5 Race rounds and 2 Bonus rounds, the most common case: @@ -4243,9 +4244,17 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor if (cupLevelNum < nummapheaders) { // In the case of Bonus rounds, we simply skip invalid maps. + if ((mapheaderinfo[cupLevelNum]->typeoflevel & TOL_BATTLE) == TOL_BATTLE) + { + bonusgt = GT_BATTLE; + } + else + { + bonusgt = G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel); + } G_MapIntoRoundQueue( cupLevelNum, - G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel), + bonusgt, setencore, // if this isn't correct, Got_Mapcmd will fix it false );