update animations correctly when advancing a unit
This commit is contained in:
parent
43d8d23a56
commit
7a3c3bdfb0
1 changed files with 8 additions and 0 deletions
|
@ -238,6 +238,14 @@ void unit::advance_to(const unit_type* t)
|
|||
{
|
||||
|
||||
reset_modifications();
|
||||
// remove old animations
|
||||
cfg_.clear_children("defend");
|
||||
cfg_.clear_children("teleport_anim");
|
||||
cfg_.clear_children("extra_anim");
|
||||
cfg_.clear_children("death");
|
||||
cfg_.clear_children("movement_anim");
|
||||
cfg_.clear_children("attack");
|
||||
|
||||
if(t->movement_type().get_parent()) {
|
||||
cfg_ = cfg_.merge_with(t->movement_type().get_parent()->get_cfg());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue