mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
Improving some screen invalidations.
This commit is contained in:
parent
e1c33a33b2
commit
385428d425
@ -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) ) {
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user