summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-05 18:14:11 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-05 18:14:11 +0300
commitd5d38cf61d5e8664eb3a1b48863bf8a835e7f28c (patch)
treecce46d04b687551c8e7f4c88f37156fdcc24e8f2 /src
parentdf6fb81185bdc4f3ec0dc6cca4fff302d2719b26 (diff)
downloadmv-d5d38cf61d5e8664eb3a1b48863bf8a835e7f28c.tar.gz
mv-d5d38cf61d5e8664eb3a1b48863bf8a835e7f28c.tar.bz2
mv-d5d38cf61d5e8664eb3a1b48863bf8a835e7f28c.tar.xz
mv-d5d38cf61d5e8664eb3a1b48863bf8a835e7f28c.zip
Fix double network error dialog.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 14e6806ce..a9fa318f7 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -557,28 +557,25 @@ void Game::logic()
return; // Not a problem here
if (Client::getState() != STATE_ERROR)
- errorMessage = _("The connection to the server was lost.");
-
- if (!disconnectedDialog)
{
- if (viewport)
- {
- Map *map = viewport->getCurrentMap();
- if (map)
- map->saveExtraLayer();
- }
- closeDialogs();
- Client::setFramerate(config.getIntValue("fpslimit"));
- if (logger)
+ errorMessage = _("The connection to the server was lost.");
+ if (!disconnectedDialog)
{
- logger->log("Show error message on state: %d",
- Client::getState());
+ disconnectedDialog = new OkDialog(_("Network Error"),
+ errorMessage, false);
+ disconnectedDialog->addActionListener(&errorListener);
+ disconnectedDialog->requestMoveToTop();
}
- disconnectedDialog = new OkDialog(_("Network Error"),
- errorMessage, false);
- disconnectedDialog->addActionListener(&errorListener);
- disconnectedDialog->requestMoveToTop();
}
+
+ if (viewport)
+ {
+ Map *map = viewport->getCurrentMap();
+ if (map)
+ map->saveExtraLayer();
+ }
+ closeDialogs();
+ Client::setFramerate(config.getIntValue("fpslimit"));
}
else
{