Skip to content

Commit

Permalink
unit: Fix bug in unit movement animation
Browse files Browse the repository at this point in the history
Do not tag unit appearance as changed when calling set_facing() and the
unit facing did not actually change
  • Loading branch information
madmax28 authored and gfgtdf committed Feb 10, 2019
1 parent 095edb3 commit 2b975e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/units/unit.cpp
Expand Up @@ -1573,7 +1573,7 @@ void unit::write(config& cfg, bool write_all) const

void unit::set_facing(map_location::DIRECTION dir) const
{
if(dir != map_location::NDIRECTIONS) {
if(dir != map_location::NDIRECTIONS && dir != facing_) {
appearance_changed_ = true;
facing_ = dir;
}
Expand Down

0 comments on commit 2b975e6

Please sign in to comment.