mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Movement): Improved pet's follow movement. (#11585)
Fixes #9254
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user