diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index f5fba647e..977336650 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -825,6 +825,12 @@ void Client::stateGame1() mainGraphics->getHeight()); } +void Client::stateSwitchLogin1() +{ + if (mOldState == STATE_GAME) + gameHandler->disconnect(); +} + int Client::gameExec() { int lastTickTime = tick_time; @@ -904,11 +910,12 @@ int Client::gameExec() { stateGame1(); } + else if (mState == STATE_SWITCH_LOGIN) + { + stateSwitchLogin1(); + } BLOCK_END("Client::gameExec 6") - if (mState == STATE_SWITCH_LOGIN && mOldState == STATE_GAME) - gameHandler->disconnect(); - if (mState != mOldState) { BLOCK_START("Client::gameExec 7") |