summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 20:04:04 +0000
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 20:04:04 +0000
commitd96a70e50f7b3b19f3424aa9b97123db681269a8 (patch)
treea9948770159e4e961c2589f52d7f41d18b4ee914 /src
parentec38926a517e9c1cfab41cf9da1e334688d006a5 (diff)
Fix an error in animated textures.
Diffstat (limited to 'src')
-rw-r--r--src/render.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render.cpp b/src/render.cpp
index 9dfa12b..8f2fdc7 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -186,7 +186,7 @@ void state_t::render(double phase, animated_texture_t *anim, rectf_t bounds, sf:
if (!anim->frame_count)
return;
- frame = floor(fmod(phase, 1.0) * anim->frame_count);
+ frame = floor((phase - floor(phase)) * anim->frame_count);
wot_rect.setTexture(anim->frames + frame, true);
wot_rect.setFillColor(color);