Skip to content

Commit

Permalink
Merge PR #5163 (halo animation freezing fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
mesilliac committed Jun 28, 2022
2 parents 12c4e5d + 7aacf94 commit 2d7e0a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/display.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/game_display.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 2d7e0a0

Please sign in to comment.