mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
- fixed game resuming when closing the load and save menus.
This commit is contained in:
parent
e266044391
commit
79ce4563eb
2 changed files with 62 additions and 2 deletions
|
@ -427,6 +427,12 @@ void GameInterface::MenuOpened()
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
screenpeek = myconnectindex;
|
screenpeek = myconnectindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto& gm = g_player[myconnectindex].ps->gm;
|
||||||
|
if (gm & MODE_GAME)
|
||||||
|
{
|
||||||
|
gm |= MODE_MENU;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
||||||
|
@ -450,8 +456,32 @@ void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
||||||
void GameInterface::MenuClosed()
|
void GameInterface::MenuClosed()
|
||||||
{
|
{
|
||||||
S_PlaySound(EXITMENUSOUND);
|
S_PlaySound(EXITMENUSOUND);
|
||||||
if (!ud.pause_on)
|
|
||||||
|
auto& gm = g_player[myconnectindex].ps->gm;
|
||||||
|
if (gm & MODE_GAME)
|
||||||
|
{
|
||||||
|
if (gm & MODE_MENU)
|
||||||
|
I_ClearAllInput();
|
||||||
|
|
||||||
|
// The following lines are here so that you cannot close the menu when no game is running.
|
||||||
|
gm &= ~MODE_MENU;
|
||||||
|
|
||||||
|
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
||||||
|
{
|
||||||
|
ready2send = 1;
|
||||||
|
totalclock = ototalclock;
|
||||||
|
CAMERACLOCK = (int32_t)totalclock;
|
||||||
|
CAMERADIST = 65536;
|
||||||
|
|
||||||
|
// Reset next-viewscreen-redraw counter.
|
||||||
|
// XXX: are there any other cases like that in need of handling?
|
||||||
|
if (g_curViewscreen >= 0)
|
||||||
|
actor[g_curViewscreen].t_data[0] = (int32_t)totalclock;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_UpdateScreenArea();
|
||||||
S_PauseSounds(false);
|
S_PauseSounds(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameInterface::CanSave()
|
bool GameInterface::CanSave()
|
||||||
|
|
|
@ -355,6 +355,12 @@ void GameInterface::MenuOpened()
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
screenpeek = myconnectindex;
|
screenpeek = myconnectindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto& gm = g_player[myconnectindex].ps->gm;
|
||||||
|
if (gm & MODE_GAME)
|
||||||
|
{
|
||||||
|
gm |= MODE_MENU;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
||||||
|
@ -378,8 +384,32 @@ void GameInterface::MenuSound(::GameInterface::EMenuSounds snd)
|
||||||
void GameInterface::MenuClosed()
|
void GameInterface::MenuClosed()
|
||||||
{
|
{
|
||||||
S_PlaySound(EXITMENUSOUND);
|
S_PlaySound(EXITMENUSOUND);
|
||||||
if (!ud.pause_on)
|
|
||||||
|
auto& gm = g_player[myconnectindex].ps->gm;
|
||||||
|
if (gm & MODE_GAME)
|
||||||
|
{
|
||||||
|
if (gm & MODE_MENU)
|
||||||
|
I_ClearAllInput();
|
||||||
|
|
||||||
|
// The following lines are here so that you cannot close the menu when no game is running.
|
||||||
|
gm &= ~MODE_MENU;
|
||||||
|
|
||||||
|
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
||||||
|
{
|
||||||
|
ready2send = 1;
|
||||||
|
totalclock = ototalclock;
|
||||||
|
CAMERACLOCK = (int32_t)totalclock;
|
||||||
|
CAMERADIST = 65536;
|
||||||
|
|
||||||
|
// Reset next-viewscreen-redraw counter.
|
||||||
|
// XXX: are there any other cases like that in need of handling?
|
||||||
|
if (g_curViewscreen >= 0)
|
||||||
|
actor[g_curViewscreen].t_data[0] = (int32_t)totalclock;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_UpdateScreenArea();
|
||||||
S_PauseSounds(false);
|
S_PauseSounds(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameInterface::CanSave()
|
bool GameInterface::CanSave()
|
||||||
|
|
Loading…
Reference in a new issue