Fix a bug spotted by uso: a victorious unit briefly lost its hp/xp bars.
Now always visible. (also allow to show his xp gain)
This commit is contained in:
parent
9028935e3b
commit
c40271e5ee
1 changed files with 3 additions and 1 deletions
|
@ -186,8 +186,10 @@ void unit_die(const gamemap::location& loc, unit& loser,
|
|||
return;
|
||||
}
|
||||
unit_animator animator;
|
||||
// hide the hp/xp bars of the loser (useless and prevent bars around an erased unit)
|
||||
animator.add_animation(&loser,"death",loc,0,false,false,"",0,unit_animation::KILL,attack,secondary_attack,0);
|
||||
animator.add_animation(winner,"victory",loc.get_direction(loser.facing()),0,false,false,"",0,
|
||||
// but show the bars of the winner (avoid blinking and show its xp gain)
|
||||
animator.add_animation(winner,"victory",loc.get_direction(loser.facing()),0,true,false,"",0,
|
||||
unit_animation::KILL,secondary_attack,attack,0);
|
||||
animator.start_animations();
|
||||
animator.wait_for_end();
|
||||
|
|
Loading…
Add table
Reference in a new issue