From 12e311bd5261078e02bffe63e125f89ae1a57209 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 May 2012 17:52:35 +0300 Subject: Move some code from logic queue to separate calls. It can improve perfomance in slow systems. --- src/game.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/game.cpp') 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(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(time(nullptr)); Being::reReadConfig(); if (killStats) killStats->recalcStats(); @@ -597,6 +615,7 @@ void Game::logic() disconnectedDialog = nullptr; } } + } void Game::adjustPerfomance() -- cgit v1.2.3-60-g2f50