summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp6
-rw-r--r--src/game.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index bcfd9ac2..16ea45d6 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -220,7 +220,8 @@ Game *Game::mInstance = 0;
Game::Game():
mLastTarget(ActorSprite::UNKNOWN),
- mCurrentMap(0), mMapName("")
+ mDisconnected(false),
+ mCurrentMap(0)
{
assert(!mInstance);
mInstance = this;
@@ -374,7 +375,7 @@ void Game::logic()
cur_time = time(NULL);
// Handle network stuff
- if (!Net::getGameHandler()->isConnected())
+ if (!Net::getGameHandler()->isConnected() && !mDisconnected)
{
if (Client::getState() == STATE_CHANGE_MAP)
return; // Not a problem here
@@ -386,6 +387,7 @@ void Game::logic()
Client::instance()->showOkDialog(_("Network Error"),
errorMessage,
STATE_CHOOSE_SERVER);
+ mDisconnected = true;
}
}
diff --git a/src/game.h b/src/game.h
index 239eb2aa..b2fae121 100644
--- a/src/game.h
+++ b/src/game.h
@@ -68,8 +68,8 @@ class Game
const std::string &getCurrentMapName() { return mMapName; }
private:
-
int mLastTarget;
+ bool mDisconnected;
WindowMenu *mWindowMenu;