Improving some screen invalidations.

This commit is contained in:
J. Tyne 2012-09-14 15:23:36 +00:00
parent e1c33a33b2
commit 385428d425
2 changed files with 4 additions and 1 deletions

View File

@ -775,6 +775,7 @@ bool place_recruit(const unit &u, const map_location &recruit_location, const ma
}
// Make sure the unit appears (if either !show or the animation is suppressed).
new_unit_itor->set_hidden(false);
resources::screen->invalidate(current_loc);
// Village capturing.
if ( resources::game_map->is_village(current_loc) ) {

View File

@ -477,6 +477,9 @@ namespace { // Private helpers for move_unit()
move_it_->set_movement(moves_left_.front());
moves_left_.pop_front();
// Invalidate before moving so we invalidate neighbor hexes if needed.
move_it_->invalidate(*move_loc_);
// Attempt actually moving.
// (Fails if *step_to is occupied).
std::pair<unit_map::iterator, bool> move_result =
@ -488,7 +491,6 @@ namespace { // Private helpers for move_unit()
move_it_->set_facing(step_from->get_relative_dir(*step_to));
move_it_->set_standing(false);
disp.invalidate_unit_after_move(*move_loc_, *step_to);
disp.invalidate(*move_loc_);
disp.invalidate(*step_to);
move_loc_ = step_to;