M_ChallengesTick: Fix no in-fade if only Chao Keys are pending

This commit is contained in:
toaster 2023-03-14 11:34:07 +00:00
parent db1b3dd7c9
commit 1fb0e0454f

View file

@ -323,7 +323,12 @@ void M_ChallengesTick(void)
} }
} }
if (challengesmenu.chaokeyadd == true) if (challengesmenu.pending && challengesmenu.fade < 5)
{
// Fade increase.
challengesmenu.fade++;
}
else if (challengesmenu.chaokeyadd == true)
{ {
if (challengesmenu.ticker <= 5) if (challengesmenu.ticker <= 5)
; // recreate the slight delay the unlock fades provide ; // recreate the slight delay the unlock fades provide
@ -376,15 +381,6 @@ void M_ChallengesTick(void)
} }
else if (challengesmenu.pending) else if (challengesmenu.pending)
{ {
// Pending mode.
if (challengesmenu.fade < 5)
{
// Fade increase.
challengesmenu.fade++;
}
else
{
// Unlock sequence.
tic_t nexttime = M_MenuExtraHeld(pid) ? (UNLOCKTIME*2) : MAXUNLOCKTIME; tic_t nexttime = M_MenuExtraHeld(pid) ? (UNLOCKTIME*2) : MAXUNLOCKTIME;
if (++challengesmenu.unlockanim >= nexttime) if (++challengesmenu.unlockanim >= nexttime)
@ -459,7 +455,6 @@ void M_ChallengesTick(void)
} }
} }
} }
}
else else
{ {