Changed next action behavior.
[supertux.git] / lib / special / sprite.h
index f848945..4906aff 100644 (file)
@@ -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