mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Movement: Use a facing spline for chase movement
This commit is contained in:
@@ -103,7 +103,6 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T &owner)
|
||||
return;
|
||||
*/
|
||||
|
||||
|
||||
D::_addUnitStateMove(owner);
|
||||
i_targetReached = false;
|
||||
i_recalculateTravel = false;
|
||||
@@ -111,6 +110,11 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T &owner)
|
||||
Movement::MoveSplineInit init(owner);
|
||||
init.MoveTo(x, y, z);
|
||||
init.SetWalk(((D*)this)->EnableWalking());
|
||||
// Using the same condition for facing target as the one that is used for SetInFront on movement end
|
||||
// - applies to ChaseMovementGenerator mostly
|
||||
if (i_angle == 0.f)
|
||||
init.SetFacing(i_target.getTarget());
|
||||
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user