diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-09-26 17:24:37 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-09-26 17:24:37 +0000 |
commit | a0fd39a05151848bef85e18e25aa0824bc9cef93 (patch) | |
tree | 60f9ed2136268d7570b4716a318e510b2c30d2ce /src/game.cpp | |
parent | 1a7f56901301fb8fe08f26526f3314b0974626ca (diff) | |
download | mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.gz mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.bz2 mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.xz mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.zip |
Added a nicer handling of when you get disconnected from the server.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index f2c68e24..6897c036 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -151,7 +151,7 @@ class DeathNoticeListener : public gcn::ActionListener { class ExitListener : public gcn::ActionListener { void action(const std::string &eventId) { if (eventId == "yes") { - state = EXIT; + state = EXIT_STATE; } exitConfirm = NULL; } @@ -377,7 +377,7 @@ void game() int gameTime = tick_time; - while (state != EXIT) + while (state == GAME_STATE) { // Handle all necessary game logic while (get_elapsed_time(gameTime) > 0) @@ -522,7 +522,7 @@ void do_input() // Quit by pressing Enter if the exit confirm is there if (exitConfirm) { - state = EXIT; + state = EXIT_STATE; } // Close the Browser if opened else if (helpWindow->isVisible()) @@ -826,7 +826,7 @@ void do_input() // Quit event else if (event.type == SDL_QUIT) { - state = EXIT; + state = EXIT_STATE; } // Push input to GUI when not used |