summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2007-12-21 15:07:20 +0000
committerDavid Athay <ko2fan@gmail.com>2007-12-21 15:07:20 +0000
commit4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc (patch)
tree7d31ee20abe90299c6782ab76ab58f1efc725715 /src/game.cpp
parent0c531de47eae77ab9fb2ec7a1fd6fc2be1462ef4 (diff)
downloadmana-client-4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc.tar.gz
mana-client-4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc.tar.bz2
mana-client-4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc.tar.xz
mana-client-4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc.zip
Attempted to fix client freeze when unable to connect to update host, and added exit dialog
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 9a669661..df355e66 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -417,6 +417,19 @@ void Game::logic()
// Handle network stuff
mNetwork->flush();
mNetwork->dispatchMessages();
+
+ if (!mNetwork->isConnected())
+ {
+ if (!exitConfirm)
+ {
+ exitConfirm = new
+ ConfirmDialog("Network Error",
+ "There was a network error, the program will now quit");
+ exitConfirm->addActionListener(&exitListener);
+ }
+
+ exitConfirm->requestMoveToTop();
+ }
}
}