Cleans up some profilemenu state in M_ResetOptions

This would pollute into M_PlayMenuJam and possibly cause it to play whenever
This commit is contained in:
toaster 2025-09-15 21:13:05 +01:00
parent 751934250c
commit e96913bda7
3 changed files with 5 additions and 5 deletions

View file

@ -91,6 +91,8 @@ void M_ResetOptions(void)
// For profiles: // For profiles:
memset(setup_player, 0, sizeof(setup_player)); memset(setup_player, 0, sizeof(setup_player));
optionsmenu.profile = NULL; optionsmenu.profile = NULL;
optionsmenu.profilemenu = false;
optionsmenu.resetprofilemenu = false;
} }
void M_InitOptions(INT32 choice) void M_InitOptions(INT32 choice)

View file

@ -54,7 +54,6 @@ void M_FirstPickProfile(INT32 c)
if (c == MA_YES) if (c == MA_YES)
{ {
M_ResetOptions(); // Reset all options variables otherwise things are gonna go reaaal bad lol. M_ResetOptions(); // Reset all options variables otherwise things are gonna go reaaal bad lol.
optionsmenu.profile = NULL; // Make sure to get rid of that, too.
PR_ApplyProfile(optionsmenu.profilen, 0); PR_ApplyProfile(optionsmenu.profilen, 0);
@ -162,7 +161,7 @@ void M_HandleProfileSelect(INT32 ch)
if (menutransition.tics == 0 && optionsmenu.resetprofile) if (menutransition.tics == 0 && optionsmenu.resetprofile)
{ {
optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.' optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.
optionsmenu.resetprofile = false; optionsmenu.resetprofile = false;
} }

View file

@ -136,7 +136,6 @@ static void M_ProfileEditExit(void)
else else
{ {
M_ResetOptions(); // Reset all options variables otherwise things are gonna go reaaal bad lol. M_ResetOptions(); // Reset all options variables otherwise things are gonna go reaaal bad lol.
optionsmenu.profile = NULL; // Make sure to get rid of that, too.
} }
PR_SaveProfiles(); // save profiles after we do that. PR_SaveProfiles(); // save profiles after we do that.