X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fspecial%2Fsprite.h;h=4906aff5f3763ed5dcaaf033d540d51ee5ee78b4;hb=be7f9f65018ed21515d389e8bd50f6f1eb988375;hp=f84894582d40ea4a33b223b56ce47d0477945ca9;hpb=70f26d626c6e0f7717be209438341987ae38ddfc;p=supertux.git diff --git a/lib/special/sprite.h b/lib/special/sprite.h index f84894582..4906aff5f 100644 --- a/lib/special/sprite.h +++ b/lib/special/sprite.h @@ -90,7 +90,7 @@ namespace SuperTux { return (int)frame; } /** Set current frame */ void set_frame(int frame_) - { frame = frame_; } + { if(frame_ > get_frames()) frame = 0; else frame = frame_; } Surface* get_frame(unsigned int frame) { if(frame < action->surfaces.size()) @@ -116,6 +116,7 @@ namespace SuperTux Actions actions; Action* action; + std::string next_action; }; } //namespace SuperTux