diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-21 19:09:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-21 22:43:11 +0300 |
commit | 5a392e77e1d77becd1ada0bdf3984c7260b8e287 (patch) | |
tree | 39d242518822dfa88f4a01508fada81d9bec26e2 /src/compoundsprite.cpp | |
parent | aa68511ad3d339be8c8f42fc6c083b696d8e687b (diff) | |
download | ManaVerse-5a392e77e1d77becd1ada0bdf3984c7260b8e287.tar.gz ManaVerse-5a392e77e1d77becd1ada0bdf3984c7260b8e287.tar.bz2 ManaVerse-5a392e77e1d77becd1ada0bdf3984c7260b8e287.tar.xz ManaVerse-5a392e77e1d77becd1ada0bdf3984c7260b8e287.zip |
Add software mode compoundsprite update delay.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r-- | src/compoundsprite.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index fe6e6ba2a..09ac4b390 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -30,6 +30,7 @@ #include "opengl1graphics.h" #endif +#include "client.h" #include "map.h" #include "resources/image.h" @@ -57,7 +58,8 @@ CompoundSprite::CompoundSprite() : mNeedsRedraw(false), mEnableAlphaFix(config.getBoolValue("enableAlphaFix")), mDisableAdvBeingCaching(config.getBoolValue("disableAdvBeingCaching")), - mDisableBeingCaching(config.getBoolValue("disableBeingCaching")) + mDisableBeingCaching(config.getBoolValue("disableBeingCaching")), + mNextRedrawTime(0) { mAlpha = 1.0f; } @@ -440,6 +442,10 @@ void CompoundSprite::updateImages() const return; #endif + if (get_elapsed_time1(mNextRedrawTime) < 10) + return; + + mNextRedrawTime = tick_time; mNeedsRedraw = false; if (!mDisableBeingCaching) |