Block Demolitionist Menu and keyboard cheats while paused.
This commit is contained in:
parent
764690b988
commit
f484de9b51
3 changed files with 15 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue