diff --git a/src/k_menufunc.c b/src/k_menufunc.c index d05eb20cc..73eeb4aef 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -3430,7 +3430,7 @@ static void M_LevelListFromGametype(INT16 gt) if (levellist.newgametype == GT_RACE) { cupheader_t *cup = kartcupheaders; - UINT8 highestid = 0; + UINT8 highestid = 0, count = 0; // Make sure there's valid cups before going to this menu. if (cup == NULL) @@ -3439,7 +3439,16 @@ static void M_LevelListFromGametype(INT16 gt) while (cup) { if (cup->unlockrequired == -1 || unlockables[cup->unlockrequired].unlocked) + { highestid = cup->id; + if (Playing() && mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->cup == cup) + { + cupgrid.x = count % CUPMENU_COLUMNS; + cupgrid.y = (count / CUPMENU_COLUMNS) % CUPMENU_ROWS; + cupgrid.pageno = count / (CUPMENU_COLUMNS * CUPMENU_ROWS); + } + count++; + } cup = cup->next; } @@ -5909,6 +5918,13 @@ void M_OpenPauseMenu(void) if (server || IsPlayerAdmin(consoleplayer)) { PAUSE_Main[mpause_switchmap].status = IT_STRING | IT_SUBMENU; + for (i = 0; i < PAUSE_GamemodesDef.numitems; i++) + { + if (PAUSE_GamemodesMenu[i].mvar2 != gametype) + continue; + PAUSE_GamemodesDef.lastOn = i; + break; + } PAUSE_Main[mpause_restartmap].status = IT_STRING | IT_CALL; PAUSE_Main[mpause_addons].status = IT_STRING | IT_CALL; }