diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-07 17:00:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-07 17:07:42 +0300 |
commit | 60ad04e80489e73a0765530dbfffc18322043b1c (patch) | |
tree | 1018764a38a68418519d7606c43e20fea85ed161 /src/game.cpp | |
parent | 422d65e9407eb9a7ed18b894ad665a7925397ebf (diff) | |
download | manaverse-60ad04e80489e73a0765530dbfffc18322043b1c.tar.gz manaverse-60ad04e80489e73a0765530dbfffc18322043b1c.tar.bz2 manaverse-60ad04e80489e73a0765530dbfffc18322043b1c.tar.xz manaverse-60ad04e80489e73a0765530dbfffc18322043b1c.zip |
Create events manager class.
Move events logging into EventsManager.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp index c3d0aa36f..0cc8da764 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -32,6 +32,7 @@ #include "configuration.h" #include "effectmanager.h" #include "emoteshortcut.h" +#include "eventsmanager.h" #include "guildmanager.h" #include "itemshortcut.h" #include "soundmanager.h" @@ -390,7 +391,6 @@ Game::Game(): mAdjustPerfomance(config.getBoolValue("adjustPerfomance")), mLowerCounter(0), mPing(0), - mLogInput(config.getBoolValue("logInput")), mTime(cur_time + 1) { touchManager.setInGame(true); @@ -1018,8 +1018,9 @@ void Game::handleInput() #endif { BLOCK_START("Game::handleInput 2") - if (mLogInput) - Client::logEvent(event); + if (eventsManager.handleEvent(event)) + continue; + if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) updateHistory(event); checkKeys(); |