diff --git a/src/menu/doommenu.cpp b/src/menu/doommenu.cpp index e6a62f3c5a..83e84896a9 100644 --- a/src/menu/doommenu.cpp +++ b/src/menu/doommenu.cpp @@ -81,6 +81,7 @@ void I_WaitVBL(int count); FNewGameStartup NewGameStartupInfo; +int LastSkill = -1; bool M_SetSpecialMenu(FName& menu, int param) @@ -147,6 +148,7 @@ bool M_SetSpecialMenu(FName& menu, int param) { // sent from the skill menu for a skill that needs to be confirmed NewGameStartupInfo.Skill = param; + LastSkill = param; const char *msg = AllSkills[param].MustConfirmText; if (*msg==0) msg = GStrings("NIGHTMARE"); @@ -157,6 +159,7 @@ bool M_SetSpecialMenu(FName& menu, int param) case NAME_Startgame: // sent either from skill menu or confirmation screen. Skill gets only set if sent from skill menu // Now we can finally start the game. Ugh... + LastSkill = param; NewGameStartupInfo.Skill = param; [[fallthrough]]; case NAME_StartgameConfirmed: @@ -1048,7 +1051,7 @@ void M_StartupSkillMenu(FNewGameStartup *gs) } if (MenuSkills.Size() == 0) I_Error("No valid skills for menu found. At least one must be defined."); - int defskill = DefaultSkill; + int defskill = LastSkill > -1? LastSkill : DefaultSkill; // use the last selected skill, if available. if ((unsigned int)defskill >= MenuSkills.Size()) { defskill = SkillIndices[(MenuSkills.Size() - 1) / 2];