diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp index d2d2ecfd..8c8fb205 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -96,7 +96,6 @@ Joystick *joystick = NULL; OkDialog *weightNotice = NULL; OkDialog *deathNotice = NULL; QuitDialog *quitDialog = NULL; -OkDialog *disconnectedDialog = NULL; ChatWindow *chatWindow; StatusWindow *statusWindow; @@ -226,8 +225,6 @@ Game::Game(): assert(!mInstance); mInstance = this; - disconnectedDialog = NULL; - // Create the viewport viewport = new Viewport; viewport->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(), @@ -386,14 +383,9 @@ void Game::logic() return; // Disconnect gets handled by STATE_ERROR errorMessage = _("The connection to the server was lost."); - - if (!disconnectedDialog) - { - disconnectedDialog = new OkDialog(_("Network Error"), - errorMessage); - disconnectedDialog->addActionListener(&errorListener); - disconnectedDialog->requestMoveToTop(); - } + Client::instance()->showOkDialog(_("Network Error"), + errorMessage, + STATE_CHOOSE_SERVER); } } |