mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +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)
|
CCMD(menu_main)
|
||||||
{
|
{
|
||||||
M_StartControlPanel(true);
|
M_StartControlPanel(true);
|
||||||
M_SetMenu(NAME_Mainmenu, -1);
|
M_SetMenu(gi->CanSave() ? NAME_IngameMenu : NAME_Mainmenu, -1);
|
||||||
}
|
|
||||||
|
|
||||||
CCMD(openmainmenu)
|
|
||||||
{
|
|
||||||
//gi->ClearSoundLocks();
|
|
||||||
M_StartControlPanel(true);
|
|
||||||
M_SetMenu(NAME_IngameMenu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD(openhelpmenu)
|
CCMD(openhelpmenu)
|
||||||
|
|
|
@ -269,14 +269,9 @@ void GameInterface::MenuClosed()
|
||||||
|
|
||||||
bool GameInterface::CanSave()
|
bool GameInterface::CanSave()
|
||||||
{
|
{
|
||||||
if (ud.recstat == 2) return false;
|
if (ud.recstat == 2 || gamestate != GS_LEVEL) return false;
|
||||||
auto &myplayer = ps[myconnectindex];
|
auto &myplayer = ps[myconnectindex];
|
||||||
if (sprite[myplayer.i].extra <= 0)
|
return (sprite[myplayer.i].extra > 0);
|
||||||
{
|
|
||||||
//P_DoQuote(QUOTE_SAVE_DEAD, &myplayer); // handled by the menu.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::StartGame(FNewGameStartup& gs)
|
void GameInterface::StartGame(FNewGameStartup& gs)
|
||||||
|
|
Loading…
Reference in a new issue