Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Mar 23, 2014
2 parents 883fe46 + c770104 commit 4e50c06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -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:
Expand Down
16 changes: 14 additions & 2 deletions src/unit_display.cpp
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4e50c06

Please sign in to comment.