diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-07 22:12:46 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-07 22:12:46 +0200 |
commit | d6f47f1f46c4e0e507a15a1f81903db901c0f4b5 (patch) | |
tree | b86d8ad7e9f655a5b7c127265080a3a5ae9db4fe | |
parent | 6c98fc5c74fce6cf2135d9add874717434d4ac12 (diff) | |
download | mana-d6f47f1f46c4e0e507a15a1f81903db901c0f4b5.tar.gz mana-d6f47f1f46c4e0e507a15a1f81903db901c0f4b5.tar.bz2 mana-d6f47f1f46c4e0e507a15a1f81903db901c0f4b5.tar.xz mana-d6f47f1f46c4e0e507a15a1f81903db901c0f4b5.zip |
Fixing reconnection after lost connection
An orderly disconnect of the map-server does work fine. Then in
Game::logic() an OkDialog is created, which triggers an event that
set the state to STATE_CHOOSE_SERVER.
Upon an unexpected disconnect the same OkDialog is created, but the player
does not see it. That is because the state gets changed to STATE_ERROR,
which creates another OkDialog. It changes the state to STATE_CHOOSE_SERVER
as well, but the ServerDialog does not take any input.
Reviewed-by: Jaxad0127
-rw-r--r-- | src/game.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index eb666fa9..026b0017 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -347,10 +347,10 @@ void Game::logic() if (Client::getState() == STATE_CHANGE_MAP) return; // Not a problem here - if (Client::getState() != STATE_ERROR) - { - errorMessage = _("The connection to the server was lost."); - } + if (Client::getState() == STATE_ERROR) + return; // Disconnect gets handled by STATE_ERROR + + errorMessage = _("The connection to the server was lost."); if (!disconnectedDialog) { |