Move options menu profile reset to before profile gets set

When exiting a card, once the transition ends, there was
a 1 tic window that an A press could select a card and
THEN set the profile pointer to NULL.
This commit is contained in:
James R 2023-02-18 13:34:02 -08:00
parent a884e332ba
commit a880044f19

View file

@ -123,6 +123,12 @@ void M_HandleProfileSelect(INT32 ch)
boolean creatable = (maxp < MAXPROFILES);
(void) ch;
if (menutransition.tics == 0 && optionsmenu.resetprofile)
{
optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.'
optionsmenu.resetprofile = false;
}
if (!creatable)
{
maxp = MAXPROFILES;
@ -215,10 +221,4 @@ void M_HandleProfileSelect(INT32 ch)
M_GoBack(0);
M_SetMenuDelay(pid);
}
if (menutransition.tics == 0 && optionsmenu.resetprofile)
{
optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.'
optionsmenu.resetprofile = false;
}
}