diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-12 21:52:27 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-16 17:43:52 -0600 |
commit | cf4a1da4eaffe19090a2246e0d3111b885a64ace (patch) | |
tree | 6187c8c7a91796e485c71ea7c88c819bec902b66 /src/client.cpp | |
parent | 11a6f342e579c26320334b9ae9735701386e3b25 (diff) | |
download | mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.gz mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.bz2 mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.xz mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.zip |
Fix canceling game connection
Reviewed-by: Bertram
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp index 0a66645e..49266a4e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -523,14 +523,14 @@ int Client::exec() if (mLimitFps) SDL_framerateDelay(&mFpsManager); - // TODO: Add connect timeouts if (mState == STATE_CONNECT_GAME && Net::getGameHandler()->isConnected()) { Net::getLoginHandler()->disconnect(); } - else if (mState == STATE_CONNECT_SERVER && mOldState == STATE_CHOOSE_SERVER) + else if (mState == STATE_CONNECT_SERVER && + mOldState == STATE_CHOOSE_SERVER) { Net::connectToServer(mCurrentServer); } @@ -775,7 +775,8 @@ int Client::exec() Net::getGameHandler()->connect(); mCurrentDialog = new ConnectionDialog( _("Connecting to the game server"), - STATE_GET_CHARACTERS); + Net::getNetworkType() == ServerInfo::EATHENA ? + STATE_CHOOSE_SERVER : STATE_SWITCH_CHARACTER); break; case STATE_CHANGE_MAP: @@ -927,7 +928,7 @@ int Client::exec() // Done with game Net::getGameHandler()->disconnect(); - Net::getCharHandler()->requestCharacters(); + mState = STATE_GET_CHARACTERS; break; case STATE_LOGOUT_ATTEMPT: |