mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
This commit is contained in:
@@ -468,7 +468,7 @@ public:
|
||||
float x, y, z;
|
||||
target->GetContactPoint(_player, x, y, z);
|
||||
|
||||
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
|
||||
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAbsoluteAngle(target), TELE_TO_GM_MODE);
|
||||
PhasingHandler::InheritPhaseShift(_player, target);
|
||||
_player->UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
@@ -1733,7 +1733,7 @@ public:
|
||||
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
|
||||
float followAngle = (creature->GetAngle(chr) - chr->GetOrientation()) * 180.0f / float(M_PI);
|
||||
float followAngle = (creature->GetAbsoluteAngle(chr) - chr->GetOrientation()) * 180.0f / float(M_PI);
|
||||
float followDist = std::sqrt(std::pow(chr->GetPositionX() - creature->GetPositionX(), 2.f) + std::pow(chr->GetPositionY() - creature->GetPositionY(), 2.f));
|
||||
uint32 groupAI = 0;
|
||||
sFormationMgr->AddFormationMember(lowguid, followAngle, followDist, leaderGUID, groupAI);
|
||||
|
||||
Reference in New Issue
Block a user