mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- open the in-game menu only when really inside a game and actually playing.
Fixes #182 This isn't foolproof but it's probably the best that can be done.
This commit is contained in:
parent
2403e8cb2c
commit
ff38cfe179
2 changed files with 3 additions and 15 deletions
|
@ -1084,14 +1084,7 @@ CCMD(reset2saved)
|
|||
CCMD(menu_main)
|
||||
{
|
||||
M_StartControlPanel(true);
|
||||
M_SetMenu(NAME_Mainmenu, -1);
|
||||
}
|
||||
|
||||
CCMD(openmainmenu)
|
||||
{
|
||||
//gi->ClearSoundLocks();
|
||||
M_StartControlPanel(true);
|
||||
M_SetMenu(NAME_IngameMenu);
|
||||
M_SetMenu(gi->CanSave() ? NAME_IngameMenu : NAME_Mainmenu, -1);
|
||||
}
|
||||
|
||||
CCMD(openhelpmenu)
|
||||
|
|
|
@ -269,15 +269,10 @@ void GameInterface::MenuClosed()
|
|||
|
||||
bool GameInterface::CanSave()
|
||||
{
|
||||
if (ud.recstat == 2) return false;
|
||||
if (ud.recstat == 2 || gamestate != GS_LEVEL) return false;
|
||||
auto &myplayer = ps[myconnectindex];
|
||||
if (sprite[myplayer.i].extra <= 0)
|
||||
{
|
||||
//P_DoQuote(QUOTE_SAVE_DEAD, &myplayer); // handled by the menu.
|
||||
return false;
|
||||
return (sprite[myplayer.i].extra > 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void GameInterface::StartGame(FNewGameStartup& gs)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue