diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-25 21:36:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-25 21:36:35 +0300 |
commit | 760b544fb26dcfc5103a44bf977cd8cd95b0862a (patch) | |
tree | d187c52aee57d51045df6b8756693e7a613dc09e /src/client.cpp | |
parent | 6ea2440a8662c4ffae8f7b6b53e84ddd25d69971 (diff) | |
download | manaverse-760b544fb26dcfc5103a44bf977cd8cd95b0862a.tar.gz manaverse-760b544fb26dcfc5103a44bf977cd8cd95b0862a.tar.bz2 manaverse-760b544fb26dcfc5103a44bf977cd8cd95b0862a.tar.xz manaverse-760b544fb26dcfc5103a44bf977cd8cd95b0862a.zip |
Move state handler STATE_SWITCH_LOGIN into separate function.
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") |