From d96a70e50f7b3b19f3424aa9b97123db681269a8 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 16 Dec 2017 20:04:04 +0000 Subject: Fix an error in animated textures. --- src/render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit