From fccb75839af38b900d0585bbbdf05b7216afba40 Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Wed, 18 Aug 2004 18:26:40 +0000 Subject: [PATCH] Round frame on checking for last frame, so that the last frame is used. SVN-Revision: 1810 --- lib/special/sprite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/special/sprite.cpp b/lib/special/sprite.cpp index 7387e3dfd..0e5fddf17 100644 --- a/lib/special/sprite.cpp +++ b/lib/special/sprite.cpp @@ -119,7 +119,7 @@ Sprite::reset() { frame = 0; last_tick = SDL_GetTicks(); -animation_reversed = true; +animation_reversed = false; next_action.clear(); } @@ -157,7 +157,7 @@ else if(animation_reversed) { float excedent = frame - 0; - if(excedent < 0 || excedent >= get_frames()) + if((int)excedent < 0 || excedent >= get_frames()) { // last case can happen when not used reverse_animation() frame = get_frames() - 1; if(animation_loops > 0) @@ -177,7 +177,7 @@ if(animation_reversed) else { float excedent = frame - action->surfaces.size(); - if(excedent >= 0) + if((int)excedent >= 0) { frame = 0; if(animation_loops > 0) -- 2.11.0