summaryrefslogtreecommitdiff
path: root/src/localplayer.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/localplayer.cpp
parent258f968327f6e790e11e809070c5ea5dc21a299c (diff)
downloadmv-12e311bd5261078e02bffe63e125f89ae1a57209.tar.gz
mv-12e311bd5261078e02bffe63e125f89ae1a57209.tar.bz2
mv-12e311bd5261078e02bffe63e125f89ae1a57209.tar.xz
mv-12e311bd5261078e02bffe63e125f89ae1a57209.zip
Move some code from logic queue to separate calls.
It can improve perfomance in slow systems.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 68a2e295c..09613a717 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -49,6 +49,7 @@
#include "gui/okdialog.h"
#include "gui/outfitwindow.h"
#include "gui/shopwindow.h"
+#include "gui/sdlfont.h"
#include "gui/skilldialog.h"
#include "gui/socialwindow.h"
#include "gui/theme.h"
@@ -258,13 +259,6 @@ void LocalPlayer::logic()
}
}
- if (weightNotice && weightNoticeTime < cur_time)
- {
- weightNotice->scheduleDelete();
- weightNotice = nullptr;
- weightNoticeTime = 0;
- }
-
// Show XP messages
if (!mMessages.empty())
{
@@ -349,6 +343,18 @@ void LocalPlayer::logic()
}
}
+ Being::logic();
+}
+
+void LocalPlayer::slowLogic()
+{
+ if (weightNotice && weightNoticeTime < cur_time)
+ {
+ weightNotice->scheduleDelete();
+ weightNotice = nullptr;
+ weightNoticeTime = 0;
+ }
+
if (serverVersion < 4 && mEnableAdvert && !mBlockAdvert
&& mAdvertTime < cur_time)
{
@@ -367,7 +373,6 @@ void LocalPlayer::logic()
else
mAdvertTime = cur_time + 30;
}
- Being::logic();
}
void LocalPlayer::setAction(Action action, int attackType)