Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Units: update facing splines immediately after launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovahlord committed Dec 17, 2023
1 parent 9242733 commit 620c39b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13664,6 +13664,7 @@ void Unit::SetFacingTo(float ori, bool force)
init.DisableTransportPathTransformations(); // It makes no sense to target global orientation
init.SetFacing(ori);
init.Launch();
UpdateSplineMovement(1);
}

void Unit::SetFacingToObject(WorldObject const* object, bool force)
Expand All @@ -13677,6 +13678,7 @@ void Unit::SetFacingToObject(WorldObject const* object, bool force)
init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZ(), false);
init.SetFacing(GetAngle(object)); // when on transport, GetAngle will still return global coordinates (and angle) that needs transforming
init.Launch();
UpdateSplineMovement(1);
}

void Unit::SetFacingToPoint(Position const& point, bool force)
Expand All @@ -13692,6 +13694,7 @@ void Unit::SetFacingToPoint(Position const& point, bool force)
init.DisableTransportPathTransformations(); // It makes no sense to target global orientation
init.SetFacing(point.GetPositionX(), point.GetPositionY(), point.GetPositionZ());
init.Launch();
UpdateSplineMovement(1);
}

bool Unit::SetWalk(bool enable)
Expand Down

0 comments on commit 620c39b

Please sign in to comment.