mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 15:20:01 +00:00
Fix bug #21257: make skip AI mid-movement animations invisible and only enable at end.
This commit is contained in:
parent
6b5f357b6e
commit
c770104621
@ -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:
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user