mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 20:32:21 +01:00
Core/Objects: Encapsulated Postion::m_orientation field to ensure it is always normalized to 0-2pi range
Closes #7400.
This commit is contained in:
@@ -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