mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Movement: use GetNearPoint to get a closer reposition location
This commit is contained in:
@@ -117,7 +117,7 @@ bool TargetedMovementGenerator<T, D>::DoUpdate(T* owner, uint32 diff)
|
||||
// Beasts move backwards. Some other creatures as well. Todo: find a way to detect this automaticly.
|
||||
bool moveBackwards = me->ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_BEAST;
|
||||
float x, y, z;
|
||||
GetTarget()->GetContactPoint(me, x, y, z);
|
||||
me->GetNearPoint(GetTarget(), x, y, z, 0.0f, 0.0f, GetTarget()->GetAngle(me));
|
||||
|
||||
Movement::MoveSplineInit init(me);
|
||||
init.MoveTo(x, y, z, true);
|
||||
|
||||
Reference in New Issue
Block a user