fix special case where the defender had a leadership ability...
...that affected the attacker, animation glitch
This commit is contained in:
parent
966ff218b9
commit
1ad21a30ad
2 changed files with 2 additions and 6 deletions
|
@ -305,12 +305,8 @@ void unit_animation::fill_initial_animations( std::vector<unit_animation> & anim
|
|||
for(itor = animation_base.begin() ; itor != animation_base.end() ; itor++ ) {
|
||||
unit_animation tmp_anim = *itor;
|
||||
// provide all default anims
|
||||
animations.push_back(*itor);
|
||||
|
||||
tmp_anim = *itor;
|
||||
//no event, providing a catch all anim
|
||||
tmp_anim.unit_anim_.remove_frames_after(600);
|
||||
animations.push_back(tmp_anim);
|
||||
animations.push_back(*itor);
|
||||
|
||||
tmp_anim = *itor;
|
||||
tmp_anim.event_ = utils::split("standing");
|
||||
|
|
|
@ -254,7 +254,7 @@ void unit_attack(
|
|||
animator.add_animation(&attacker,"attack",att->first,damage,true,false,"",0,hit_type,&attack,secondary_attack,swing);
|
||||
animator.add_animation(&defender,"defend",def->first,damage,true,false,text,display::rgb(255,0,0),hit_type,&attack,secondary_attack,swing);
|
||||
|
||||
if(leader_loc.valid()){
|
||||
if(leader_loc.valid()&& leader_loc !=att->first && leader_loc != def->first){
|
||||
leader = units.find(leader_loc);
|
||||
leader->second.set_facing(leader_loc.get_relative_dir(a));
|
||||
assert(leader != units.end());
|
||||
|
|
Loading…
Add table
Reference in a new issue