diff --git a/changelog b/changelog index c50f92d2a907..1a29076a69ac 100644 --- a/changelog +++ b/changelog @@ -47,6 +47,7 @@ Version 1.13.0-dev: * Fixed halos glitching through locations that become shrouded after the halo is rendered for the first time. * OS X user data directory is now ~/Library/Application Support/Wesnoth_1.13 + * Fix bug #21257: Lagging animations with skip AI animations and fog/shroud. Version 1.11.11: * Add-ons server: diff --git a/src/unit_display.cpp b/src/unit_display.cpp index 39afc6a63de8..439f4bb3045a 100644 --- a/src/unit_display.cpp +++ b/src/unit_display.cpp @@ -308,10 +308,17 @@ void unit_mover::start(unit& u) */ void unit_mover::proceed_to(unit& u, size_t path_index, bool update, bool wait) { - // Nothing to do here if animations can/should not be shown. - if ( !can_draw_ || !animate_ ) + // Nothing to do here if animations cannot be shown. + if ( !can_draw_ ) return; + // If no animation then hide unit until end of movement + if (!animate_) + { + u.set_hidden(true); + return; + } + // Handle pending visibility issues before introducing new ones. wait_for_anims(); @@ -454,6 +461,11 @@ void unit_mover::finish(unit &u, map_location::DIRECTION dir) mousehandler->invalidate_reachmap(); } } + else + { + // Show the unit at end of skipped animation + u.set_hidden(was_hidden_); + } // Facing gets set even when not animating. u.set_facing(dir == map_location::NDIRECTIONS ? final_dir : dir);