diff options
| author | oy <Tom_Adams@web.de> | 2012-01-06 20:03:57 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-06 20:03:57 +0100 |
| commit | 27852934693bc8e3192bd06378095e457d436e71 (patch) | |
| tree | b54cc5dcec2434a30e012edd784d5ff078ebcb75 /src | |
| parent | f3ebfae18e409e48b6553019788fbf4818f40eee (diff) | |
| download | zcatch-27852934693bc8e3192bd06378095e457d436e71.tar.gz zcatch-27852934693bc8e3192bd06378095e457d436e71.zip | |
don't start playing the music again if we're quitting
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/client/client.cpp | 6 | ||||
| -rw-r--r-- | src/game/client/components/menus.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 34923f28..8faf1e41 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -461,6 +461,9 @@ int *CClient::GetInput(int Tick) // ------ state handling ----- void CClient::SetState(int s) { + if(m_State == IClient::STATE_QUITING) + return; + int Old = m_State; if(g_Config.m_Debug) { @@ -1842,7 +1845,10 @@ void CClient::Run() // panic quit button if(Input()->KeyPressed(KEY_LCTRL) && Input()->KeyPressed(KEY_LSHIFT) && Input()->KeyPressed('q')) + { + Quit(); break; + } if(Input()->KeyPressed(KEY_LCTRL) && Input()->KeyPressed(KEY_LSHIFT) && Input()->KeyDown('d')) g_Config.m_Debug ^= 1; diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index a2ccfba4..15837efc 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -1403,7 +1403,7 @@ void CMenus::OnStateChange(int NewState, int OldState) if(NewState == IClient::STATE_OFFLINE) { - if(OldState >= IClient::STATE_ONLINE) + if(OldState >= IClient::STATE_ONLINE && NewState < IClient::STATE_QUITING) m_pClient->m_pSounds->Play(CSounds::CHN_MUSIC, SOUND_MENU, 1.0f); m_Popup = POPUP_NONE; if(Client()->ErrorString() && Client()->ErrorString()[0] != 0) |