diff --git a/language.version b/language.version index 6df34556e..7e2fe0937 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r379 \cu(Sat 27 Aug 16:56:35 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r379 \cu(2022-08-27 16:56:35)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r380 \cu(Sat 27 Aug 22:50:52 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r380 \cu(2022-08-27 22:50:52)\c-"; diff --git a/zscript/handler/swwm_handler_process.zsc b/zscript/handler/swwm_handler_process.zsc index 8bdb51f32..335d8b782 100644 --- a/zscript/handler/swwm_handler_process.zsc +++ b/zscript/handler/swwm_handler_process.zsc @@ -11,7 +11,7 @@ extend Class SWWMHandler // doing it with an event because this way we can control WHEN it should be openable if ( e.Name ~== "swwmdemomenu" ) { - 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 ) return; if ( !(Menu.GetCurrentMenu() is 'DemolitionistMenu') ) Menu.SetMenu('DemolitionistMenu'); @@ -572,6 +572,14 @@ extend Class SWWMHandler override bool InputProcess( InputEvent e ) { if ( e.Type != InputEvent.TYPE_KeyDown ) return false; + // block invprev/next inputs when paused + if ( paused ) + { + String cmd = Bindings.GetBinding(e.KeyScan); + if ( (cmd ~== "invprev") || (cmd ~== "invnext") ) return true; + // skip the rest of this function + return false; + } // F if ( e.KeyChar == 0x66 ) { @@ -590,7 +598,7 @@ extend Class SWWMHandler } } // cheats - if ( (e.KeyChar >= 0x61) && (e.KeyChar <= 0x7A) ) + if ( (e.KeyChar >= 0x61) && (e.KeyChar <= 0x7A) && !paused ) { if ( CheatInput(e) ) return true; diff --git a/zscript/kbase/swwm_kbase.zsc b/zscript/kbase/swwm_kbase.zsc index d06b71764..eb2e15c27 100644 --- a/zscript/kbase/swwm_kbase.zsc +++ b/zscript/kbase/swwm_kbase.zsc @@ -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();