Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore unit bars after moving even if the animator is disabled
This fixes an issue where unit bars disappeared for individual units after a movement action with Quick Replays on or when using the Skip Animations replay option, so that they'd only reappear after playing an attack or select animation (or any other animation, probably). The cause was that these options cause the replay code to hold a CVideo lock, which causes the unit_display::unit_mover::finish() to return early without restoring the animated unit's bars. Since this also makes the u_d::unit_mover not hide the bars in the first place, it wouldn't normally be an issue; the bug is actually caused by an interaction with actions::unit_mover::do_move(), which unconditionally hides a unit's bars for every movement step. Since I don't want to call unit::set_standing() more times than necessary (even though a::u_m::do_move() appears to do just that), I decided to have u_d::u_m::finish() reset the unit's state even when it's not supposed to do anything due to display locks. I also added comments in a::u_m::do_move() and u_d::u_m::finish() to warn people about this interaction in case it comes up again in the future.
- Loading branch information
Showing
4 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters