Though, there are still warnings of out of range animations. Would be nice if someone could have a look at this.
SVN-Revision: 1874
return;
}
action = i->second;
+
+if((int)frame >= get_frames())
+ frame = 0;
}
void
}
else
{
- float excedent = frame - action->surfaces.size();
+ float excedent = frame - (get_frames()+1);
if((int)excedent >= 0)
{
frame = 0;
if((int)frame >= get_frames() || (int)frame < 0)
std::cerr << "Warning: frame out of range: " << (int)frame
- << "/" << get_frames() << " at sprite: " << get_name()
+ << "/" << get_frames() << " at " << get_name()
<< "/" << get_action_name() << std::endl;
else
context.draw_surface(action->surfaces[(int)frame],