summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-23 15:26:17 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-23 15:26:17 +0300
commit1b864413966ca75990611a063e36a65372c00cf6 (patch)
tree007444ba70b7de17f5e1dc97835484923fd4a67e /src
parent78d67cdf35c80381366fee29b212aca23d7240fd (diff)
downloadplus-1b864413966ca75990611a063e36a65372c00cf6.tar.gz
plus-1b864413966ca75990611a063e36a65372c00cf6.tar.bz2
plus-1b864413966ca75990611a063e36a65372c00cf6.tar.xz
plus-1b864413966ca75990611a063e36a65372c00cf6.zip
Improve speed in main cycle.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp
index dc4f118a8..8f64b6b1e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -995,21 +995,21 @@ int Client::gameExec()
BLOCK_END("Client::gameExec 3")
BLOCK_START("Client::gameExec 4")
+ if (gui)
+ gui->logic();
int k = 0;
while (lastTickTime != tick_time && k < 40)
{
- if (gui)
- gui->logic();
if (mGame)
mGame->logic();
else if (gui)
gui->handleInput();
- sound.logic();
-
++lastTickTime;
k ++;
}
+ sound.logic();
+
logic_count += k;
if (gui)
gui->slowLogic();