diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-07 07:51:35 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-07 07:52:38 -0600 |
commit | b6580a8e547732ec1194afe218c030b8230659e2 (patch) | |
tree | a1c2ae8454db1f91274c5c13e3d67d81343532c4 /src/game.cpp | |
parent | 67f53660db85c2f325472701517e04c446ec8ed4 (diff) | |
download | mana-b6580a8e547732ec1194afe218c030b8230659e2.tar.gz mana-b6580a8e547732ec1194afe218c030b8230659e2.tar.bz2 mana-b6580a8e547732ec1194afe218c030b8230659e2.tar.xz mana-b6580a8e547732ec1194afe218c030b8230659e2.zip |
Fix handling of error messages in the game state
Also make sure an appropirate message gets shown on duplicated login.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index b8c0b73d..d640815d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -34,6 +34,7 @@ #include "keyboardconfig.h" #include "localplayer.h" #include "log.h" +#include "main.h" #include "map.h" #include "npc.h" #include "particle.h" @@ -474,12 +475,15 @@ void Game::logic() Net::getGeneralHandler()->flushNetwork(); if (!Net::getGeneralHandler()->isNetworkConnected()) { + if (state != STATE_ERROR) + { + errorMessage = _("The connection to the server was lost, " + "the program will now quit"); + } + if (!disconnectedDialog) { - disconnectedDialog = new OkDialog(_("Network Error"), - _("The connection to the " - "server was lost, the " - "program will now quit")); + disconnectedDialog = new OkDialog(_("Network Error"), errorMessage); disconnectedDialog->addActionListener(&exitListener); disconnectedDialog->requestMoveToTop(); } |