fix status bar blinking during fight, now redraw them only at end of fight
This commit is contained in:
parent
8e8c100894
commit
e0080f9e34
2 changed files with 6 additions and 7 deletions
|
@ -1190,10 +1190,12 @@ void attack(display& gui, const gamemap& map,
|
|||
}
|
||||
|
||||
if(attackerxp && a != units.end()) {
|
||||
a->second.set_standing(gui,attacker);
|
||||
a->second.get_experience(attackerxp);
|
||||
}
|
||||
|
||||
if(defenderxp && d != units.end()) {
|
||||
d->second.set_standing(gui,defender);
|
||||
d->second.get_experience(defenderxp);
|
||||
}
|
||||
|
||||
|
|
|
@ -351,12 +351,10 @@ bool unit_attack_ranged(display& disp, unit_map& units,
|
|||
|
||||
|
||||
if(dead) {
|
||||
if(leader_loc.valid()) leader->second.set_standing(disp,leader_loc);
|
||||
att->second.set_standing(disp,a);
|
||||
unit_display::unit_die(disp,def->first,def->second,&attack);
|
||||
} else {
|
||||
def->second.set_standing(disp,b);
|
||||
}
|
||||
if(leader_loc.valid()) leader->second.set_standing(disp,leader_loc);
|
||||
att->second.set_standing(disp,a);
|
||||
disp.update_display();
|
||||
events::pump();
|
||||
|
||||
|
@ -473,12 +471,11 @@ bool unit_attack(display& disp, unit_map& units,
|
|||
|
||||
|
||||
if(dead) {
|
||||
if(leader_loc.valid()) leader->second.set_standing(disp,leader_loc);
|
||||
att->second.set_standing(disp,a);
|
||||
unit_display::unit_die(disp,def->first,def->second,&attack);
|
||||
} else {
|
||||
def->second.set_standing(disp,b);
|
||||
}
|
||||
if(leader_loc.valid()) leader->second.set_standing(disp,leader_loc);
|
||||
att->second.set_standing(disp,a);
|
||||
disp.update_display();
|
||||
events::pump();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue