unit: Fix bug in unit movement animation

Do not tag unit appearance as changed when calling set_facing() and the
unit facing did not actually change
This commit is contained in:
Maximilian Fricke 2019-02-10 19:52:12 +01:00 committed by gfgtdf
parent 095edb36a1
commit 2b975e65a7

View file

@ -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;
}