summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-13 17:52:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-13 17:52:35 +0300
commit12e311bd5261078e02bffe63e125f89ae1a57209 (patch)
tree9a71f8e4ca78ea6f5eb09ccdb3bd6cd95830c884 /src/game.cpp
parent258f968327f6e790e11e809070c5ea5dc21a299c (diff)
downloadManaVerse-12e311bd5261078e02bffe63e125f89ae1a57209.tar.gz
ManaVerse-12e311bd5261078e02bffe63e125f89ae1a57209.tar.bz2
ManaVerse-12e311bd5261078e02bffe63e125f89ae1a57209.tar.xz
ManaVerse-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.cpp21
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()