fix(Core/Movement): Improved pet's follow movement. (#11585)
Fixes #9254
This commit is contained in:
parent
94123e60f6
commit
43db8a6d13
1 changed files with 2 additions and 3 deletions
|
|
@ -453,11 +453,10 @@ bool FollowMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
|||
else
|
||||
i_path->Clear();
|
||||
|
||||
float distance = _range - target->GetCombatReach();
|
||||
target->MovePositionToFirstCollision(targetPosition, owner->GetCombatReach() + _range, target->ToAbsoluteAngle(_angle.RelativeAngle) - target->GetOrientation());
|
||||
|
||||
float relAngle = _angle.RelativeAngle;
|
||||
float x, y, z;
|
||||
target->GetNearPoint(owner, x, y, z, owner->GetCombatReach(), distance, target->ToAbsoluteAngle(relAngle), 0.f, &targetPosition);
|
||||
targetPosition.GetPosition(x, y, z);
|
||||
|
||||
if (owner->IsHovering())
|
||||
owner->UpdateAllowedPositionZ(x, y, z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue