summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp8
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)