From 7aacf94dddeed3669ffe99136c3346977a154d60 Mon Sep 17 00:00:00 2001 From: DisherProject Date: Thu, 24 Sep 2020 19:16:01 +0200 Subject: [PATCH] Don't freeze haloes ... when they're the only animated thing in vision Fixes #4961 --- src/display.cpp | 8 +++----- src/game_display.cpp | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index a3997206280..60ac88f09e5 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -2512,16 +2512,12 @@ 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()) { //int simulate_delay = 0; - /* - * draw_invalidated() also invalidates the halos, so also needs to be - * ran if invalidated_.empty() == true. - */ if(!invalidated_.empty()) { draw_invalidated(); invalidated_.clear(); @@ -3131,6 +3127,8 @@ void display::invalidate_animations() new_inval |= u->anim_comp().invalidate(*this); } } while (new_inval); + + halo_man_->unrender(invalidated_); } void display::reset_standing_animations() diff --git a/src/game_display.cpp b/src/game_display.cpp index 4476ed5ce3f..880d24762c6 100644 --- a/src/game_display.cpp +++ b/src/game_display.cpp @@ -226,7 +226,6 @@ void game_display::post_draw() { void game_display::draw_invalidated() { - halo_man_->unrender(invalidated_); display::draw_invalidated(); if (fake_unit_man_->empty()) { return;