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/net/manaserv/generalhandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/net/manaserv/generalhandler.cpp') diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp index 9f14fd38..171ca214 100644 --- a/src/net/manaserv/generalhandler.cpp +++ b/src/net/manaserv/generalhandler.cpp @@ -21,7 +21,7 @@ #include "net/manaserv/generalhandler.h" -#include "main.h" +#include "client.h" #include "gui/changeemaildialog.h" #include "gui/charselectdialog.h" @@ -147,11 +147,11 @@ void GeneralHandler::flushNetwork() { flush(); - if (state == STATE_SWITCH_CHARACTER && + if (Client::getState() == STATE_SWITCH_CHARACTER && Net::getLoginHandler()->isConnected()) { loginHandler->reconnect(); - state = STATE_GET_CHARACTERS; + Client::setState(STATE_GET_CHARACTERS); } } -- cgit v1.2.3-70-g09d2