diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-13 17:52:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-13 17:52:35 +0300 |
commit | 12e311bd5261078e02bffe63e125f89ae1a57209 (patch) | |
tree | 9a71f8e4ca78ea6f5eb09ccdb3bd6cd95830c884 /src/game.cpp | |
parent | 258f968327f6e790e11e809070c5ea5dc21a299c (diff) | |
download | plus-12e311bd5261078e02bffe63e125f89ae1a57209.tar.gz plus-12e311bd5261078e02bffe63e125f89ae1a57209.tar.bz2 plus-12e311bd5261078e02bffe63e125f89ae1a57209.tar.xz plus-12e311bd5261078e02bffe63e125f89ae1a57209.zip |
Move some code from logic queue to separate calls.
It can improve perfomance in slow systems.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 363a30ad4..4ed04a20f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -543,10 +543,28 @@ void Game::logic() actorSpriteManager->logic(); if (particleEngine) particleEngine->update(); + + cur_time = static_cast<int>(time(nullptr)); +} + +void Game::slowLogic() +{ + if (player_node) + player_node->slowLogic(); + if (botCheckerWindow) + botCheckerWindow->slowLogic(); + if (debugWindow) + debugWindow->slowLogic(); + if (killStats) + killStats->update(); + if (socialWindow) + socialWindow->slowLogic(); + if (whoIsOnline) + whoIsOnline->slowLogic(); + if (mCurrentMap) mCurrentMap->update(); - cur_time = static_cast<int>(time(nullptr)); Being::reReadConfig(); if (killStats) killStats->recalcStats(); @@ -597,6 +615,7 @@ void Game::logic() disconnectedDialog = nullptr; } } + } void Game::adjustPerfomance() |