Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.

(cherry picked from commit 4692e10ca2)
This commit is contained in:
Treeston
2018-04-01 13:52:36 +02:00
committed by Shauren
parent bf958da148
commit bc89e1cdb0
38 changed files with 71 additions and 89 deletions

View File

@@ -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();
}

View File

@@ -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);