From c8b0d1e56f27c3141895d28b2fc768afffe7bb2d Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 21 Feb 2010 20:40:07 +0100 Subject: Made tick counter and framerate limiter work during login sequence Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ... --- src/gui/worldselectdialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/worldselectdialog.cpp') diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp index ac229302..3219b83d 100644 --- a/src/gui/worldselectdialog.cpp +++ b/src/gui/worldselectdialog.cpp @@ -21,7 +21,7 @@ #include "gui/worldselectdialog.h" -#include "main.h" +#include "client.h" #include "gui/sdlinput.h" @@ -115,12 +115,12 @@ void WorldSelectDialog::action(const gcn::ActionEvent &event) Net::getLoginHandler()->chooseServer(mWorldList->getSelected()); // Check in case netcode moves us forward - if (state == STATE_WORLD_SELECT) - state = STATE_WORLD_SELECT_ATTEMPT; + if (Client::getState() == STATE_WORLD_SELECT) + Client::setState(STATE_WORLD_SELECT_ATTEMPT); } else if (event.getId() == "login") { - state = STATE_LOGIN; + Client::setState(STATE_LOGIN); } } -- cgit v1.2.3-70-g09d2