mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 14:13:31 +00:00
Merge PR #5163 (halo animation freezing fix)
This commit is contained in:
commit
2d7e0a074d
@ -2477,14 +2477,10 @@ void display::draw(bool update, bool force)
|
||||
|
||||
draw_init();
|
||||
pre_draw();
|
||||
// invalidate all that needs to be invalidated
|
||||
// invalidate animated terrain, units and haloes
|
||||
invalidate_animations();
|
||||
|
||||
if(!get_map().empty()) {
|
||||
/*
|
||||
* draw_invalidated() also invalidates the halos, so also needs to be
|
||||
* ran if invalidated_.empty() == true.
|
||||
*/
|
||||
if(!invalidated_.empty()) {
|
||||
draw_invalidated();
|
||||
invalidated_.clear();
|
||||
@ -3118,6 +3114,8 @@ void display::invalidate_animations()
|
||||
new_inval |= u->anim_comp().invalidate(*this);
|
||||
}
|
||||
} while(new_inval);
|
||||
|
||||
halo_man_->unrender(invalidated_);
|
||||
}
|
||||
|
||||
void display::reset_standing_animations()
|
||||
|
@ -229,7 +229,6 @@ void game_display::post_draw() {
|
||||
|
||||
void game_display::draw_invalidated()
|
||||
{
|
||||
halo_man_->unrender(invalidated_);
|
||||
display::draw_invalidated();
|
||||
if (fake_unit_man_->empty()) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user