Core/Objects: Encapsulated Postion::m_orientation field to ensure it is always normalized to 0-2pi range
Closes #7400.
This commit is contained in:
1 parent
69cfc0f7bf
commit
6cea446f22
14 files changed
+46
-52
No files matched your search
@@ -303,7 +303,6 @@ class npc_coldflame : public CreatureScript
|
||||
{
|
||||
Position const* ownerPos = marrowgarAI->GetLastColdflamePosition();
|
||||
float ang = me->GetAngle(ownerPos) - static_cast<float>(M_PI);
|
||||
ang = MapManager::NormalizeOrientation(ang);
|
||||
me->SetOrientation(ang);
|
||||
owner->GetNearPosition(pos, 2.5f, 0.0f);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
coreEnergizeOrientation = me->GetOrientation();
|
||||
firstCoreEnergize = true;
|
||||
} else
|
||||
coreEnergizeOrientation = MapManager::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
|
||||
coreEnergizeOrientation = Position::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
|
||||
|
||||
DoCast(me, SPELL_ENERGIZE_CORES_VISUAL);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
|
||||
|
||||
@@ -488,7 +488,7 @@ class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
|
||||
pos.m_positionX = 1756.25f + irand(-3, 3);
|
||||
pos.m_positionY = -8.3f + irand(-3, 3);
|
||||
pos.m_positionZ = 448.8f;
|
||||
pos.m_orientation = M_PI;
|
||||
pos.SetOrientation(M_PI);
|
||||
GetHitPlayer()->DestroyForNearbyPlayers();
|
||||
GetHitPlayer()->ExitVehicle(&pos);
|
||||
GetHitPlayer()->UpdateObjectVisibility(false);
|
||||
|
||||
Reference in new issue
Block a user