Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
Port From (https://github.com/TrinityCore/TrinityCore/commit/bc89e1cdb0da10e53cc9fa4a97565c05bb4c052e)
This commit is contained in:
@@ -806,7 +806,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
|
||||
Player chr = handler.GetSession().GetPlayer();
|
||||
float followAngle = (creature.GetAngle(chr) - chr.GetOrientation()) * 180.0f / MathF.PI;
|
||||
float followAngle = (creature.GetAbsoluteAngle(chr) - chr.GetOrientation()) * 180.0f / MathF.PI;
|
||||
float followDist = MathF.Sqrt(MathF.Pow(chr.GetPositionX() - creature.GetPositionX(), 2f) + MathF.Pow(chr.GetPositionY() - creature.GetPositionY(), 2f));
|
||||
uint groupAI = 0;
|
||||
FormationMgr.AddFormationMember(lowguid, followAngle, followDist, leaderGUID, groupAI);
|
||||
|
||||
Reference in New Issue
Block a user