Core/Movement: Fixed formation movement resetting state on every waypoint of its leader
Port From (https://github.com/TrinityCore/TrinityCore/commit/1f62d3caaac234bca14929ec2397befe69b85900)
This commit is contained in:
@@ -286,7 +286,7 @@ namespace Game.Entities
|
|||||||
float angle = formationInfo.FollowAngle + MathF.PI; // for some reason, someone thought it was a great idea to invert relativ angles...
|
float angle = formationInfo.FollowAngle + MathF.PI; // for some reason, someone thought it was a great idea to invert relativ angles...
|
||||||
float dist = formationInfo.FollowDist;
|
float dist = formationInfo.FollowDist;
|
||||||
|
|
||||||
if (!member.HasUnitState(UnitState.FollowFormation))
|
if (member.GetMotionMaster().GetCurrentMovementGeneratorType(MovementSlot.Default) != MovementGeneratorType.Formation)
|
||||||
member.GetMotionMaster().MoveFormation(_leader, dist, angle, formationInfo.LeaderWaypointIDs[0], formationInfo.LeaderWaypointIDs[1]);
|
member.GetMotionMaster().MoveFormation(_leader, dist, angle, formationInfo.LeaderWaypointIDs[0], formationInfo.LeaderWaypointIDs[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user