diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-02 22:15:55 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-02 22:15:55 +0200 |
commit | 4ead5c9f65ffbf1de9b0cb60cae06b116badbced (patch) | |
tree | bc94093b90e7b4d3168259b7404ae2f6236f3925 /src/game.cpp | |
parent | 4b0caea6389ab789ff3ae3a267b9002f8a21e8c3 (diff) | |
download | manaplus-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.gz manaplus-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.bz2 manaplus-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.xz manaplus-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.zip |
Close npc and other dialogs if reconnecting.
Also save extra layers if network error.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index f5565b71e..efa5085f5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -484,12 +484,27 @@ void Game::logic() if (!disconnectedDialog) { + if (viewport) + { + Map *map = viewport->getCurrentMap(); + if (map) + map->saveExtraLayer(); + } + Client::closeDialogs(); disconnectedDialog = new OkDialog(_("Network Error"), errorMessage, false); disconnectedDialog->addActionListener(&errorListener); disconnectedDialog->requestMoveToTop(); } } + else + { + if (disconnectedDialog) + { + disconnectedDialog->scheduleDelete(); + disconnectedDialog = 0; + } + } } /** |