From: Ricardo Cruz Date: Wed, 18 Aug 2004 18:26:40 +0000 (+0000) Subject: Round frame on checking for last frame, so that the last frame is used. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fccb75839af38b900d0585bbbdf05b7216afba40;p=supertux.git Round frame on checking for last frame, so that the last frame is used. SVN-Revision: 1810 --- 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)