summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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
{