fix mvt animation being stuck on first frame

This commit is contained in:
Jérémy Rosen 2007-05-25 17:31:33 +00:00
parent 8cf156a76c
commit 581bdb1b69

View file

@ -1685,8 +1685,7 @@ void unit::set_victorious(const display &disp,const gamemap::location& loc,const
void unit::set_walking(const display &disp,const gamemap::location& loc)
{
movement_animation* const anim = dynamic_cast<movement_animation*>(anim_);
if(state_ == STATE_WALKING && anim != NULL && anim->matches(disp,loc,this) >=0) {
if(state_ == STATE_WALKING && anim_ != NULL && anim_->matches(disp,loc,this) >=0) {
return; // finish current animation, don't start a new one
}
state_ = STATE_WALKING;