Block Demolitionist Menu and keyboard cheats while paused.

This commit is contained in:
Mari the Deer 2022-08-27 22:50:52 +02:00
commit f484de9b51
3 changed files with 15 additions and 7 deletions

View file

@ -146,9 +146,9 @@ Class DemolitionistMenu : GenericMenu
{
Super.Init(parent);
Animated = DontDim = DontBlur = true;
// can't open this menu outside of the game or if dead
// can't open this menu outside of the game, if dead, or if the game is currently paused
// also can't if you're not the Demolitionist
if ( (gamestate != GS_LEVEL) || (players[consoleplayer].Health <= 0) || !(players[consoleplayer].mo is 'Demolitionist') )
if ( (gamestate != GS_LEVEL) || (players[consoleplayer].Health <= 0) || !(players[consoleplayer].mo is 'Demolitionist') || paused )
{
animtimer = -1.;
isclosing = true;
@ -316,7 +316,7 @@ Class DemolitionistMenu : GenericMenu
MenuSound("menu/democlose");
isclosing = true;
}
if ( (gamestate != GS_LEVEL) || (isclosing && (animtimer <= 0.)) )
if ( (gamestate != GS_LEVEL) || paused || (isclosing && (animtimer <= 0.)) )
{
// ded (or force close)
DoClose();