fixed bug where units with a special frame...
...for defending long range attacks flickered back to their normal frame between attacks
This commit is contained in:
parent
ce6c79dff2
commit
61c14d7f96
2 changed files with 7 additions and 8 deletions
|
@ -898,15 +898,16 @@ void attack(display& gui, const gamemap& map,
|
|||
|
||||
if(attackerxp) {
|
||||
a->second.get_experience(attackerxp);
|
||||
gui.invalidate(a->first);
|
||||
}
|
||||
|
||||
if(defenderxp) {
|
||||
d->second.get_experience(defenderxp);
|
||||
gui.invalidate(d->first);
|
||||
}
|
||||
|
||||
gui.invalidate_unit();
|
||||
gui.invalidate(attacker);
|
||||
gui.invalidate(defender);
|
||||
gui.draw(true,true);
|
||||
}
|
||||
|
||||
int village_owner(const gamemap::location& loc, const std::vector<team>& teams)
|
||||
|
|
|
@ -579,8 +579,6 @@ bool unit_attack_ranged(display& disp, unit_map& units,
|
|||
damage = 0;
|
||||
}
|
||||
|
||||
def->second.set_standing();
|
||||
|
||||
if(leader_loc.valid()){
|
||||
leader->second.set_leading(false);
|
||||
}
|
||||
|
@ -588,6 +586,8 @@ bool unit_attack_ranged(display& disp, unit_map& units,
|
|||
disp.draw_tile(a.x,a.y);
|
||||
disp.draw_tile(b.x,b.y);
|
||||
|
||||
def->second.set_standing();
|
||||
|
||||
if(leader_loc.valid()){
|
||||
disp.draw_tile(leader_loc.x,leader_loc.y);
|
||||
}
|
||||
|
@ -625,8 +625,6 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
|
|||
}
|
||||
|
||||
log_scope("unit_attack");
|
||||
disp.invalidate_all();
|
||||
disp.draw(true,true);
|
||||
|
||||
const unit_map::iterator att = units.find(a);
|
||||
assert(att != units.end());
|
||||
|
@ -846,8 +844,6 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
|
|||
damage = 0;
|
||||
}
|
||||
|
||||
def->second.set_standing();
|
||||
|
||||
if(leader_loc.valid()){
|
||||
leader->second.set_leading(false);
|
||||
}
|
||||
|
@ -858,6 +854,8 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
|
|||
disp.draw_tile(leader_loc.x,leader_loc.y);
|
||||
}
|
||||
|
||||
def->second.set_standing();
|
||||
|
||||
if(dead) {
|
||||
unit_display::unit_die(disp,def->first,def->second);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue