Core/Collision: Replaced phasemask with proper phases in GameObject c…
…ollision calculation
This commit is contained in:
1 parent
27683014f2
commit
0fbcdca05e
29 files changed
+120
-152
No files matched your search
@@ -88,7 +88,7 @@ class boss_amanitar : public CreatureScript
|
||||
for (uint8 i = 0; i < 30; ++i)
|
||||
{
|
||||
Position pos = me->GetRandomNearPosition(30.0f);
|
||||
pos.m_positionZ = me->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), MAX_HEIGHT) + 2.0f;
|
||||
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), MAX_HEIGHT) + 2.0f;
|
||||
|
||||
if (Creature* trigger = me->SummonCreature(NPC_TRIGGER, pos))
|
||||
{
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ class npc_frost_sphere : public CreatureScript
|
||||
if (me->GetHealth() <= damage)
|
||||
{
|
||||
damage = 0;
|
||||
float floorZ = me->GetMap()->GetHeight(me->GetPhaseMask(), me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
float floorZ = me->GetMap()->GetHeight(me->GetPhases(), me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
if (fabs(me->GetPositionZ() - floorZ) < 0.1f)
|
||||
{
|
||||
// we are close to the ground
|
||||
|
||||
@@ -805,7 +805,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
{
|
||||
float x, y, z;
|
||||
summon->GetPosition(x, y, z);
|
||||
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
|
||||
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhases(), x, y, z, true, 500.0f);
|
||||
summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
|
||||
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
@@ -1047,7 +1047,7 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->GetPosition(_x, _y, _groundZ);
|
||||
me->DespawnOrUnsummon(60000);
|
||||
_groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
|
||||
_groundZ = me->GetMap()->GetHeight(me->GetPhases(), _x, _y, _groundZ, true, 500.0f);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
|
||||
@@ -2018,7 +2018,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
Position pos = caster->GetNearPosition(5.0f, 0.0f);
|
||||
//pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
|
||||
//pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
|
||||
//pos.m_positionZ += 0.05f;
|
||||
caster->SetHomePosition(pos);
|
||||
caster->GetMotionMaster()->MoveLand(POINT_LAND, pos);
|
||||
|
||||
@@ -777,7 +777,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
|
||||
z = me->GetMap()->GetHeight(me->GetPhases(), x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetPosition(x, y, z, 0);
|
||||
}
|
||||
|
||||
@@ -863,7 +863,7 @@ class boss_sara : public CreatureScript
|
||||
float angle = frand(0.0f, 2.0f * float(M_PI));
|
||||
pos.m_positionX = YoggSaronSpawnPos.GetPositionX() + radius * cosf(angle);
|
||||
pos.m_positionY = YoggSaronSpawnPos.GetPositionY() + radius * sinf(angle);
|
||||
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), YoggSaronSpawnPos.GetPositionZ() + 5.0f);
|
||||
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), YoggSaronSpawnPos.GetPositionZ() + 5.0f);
|
||||
me->SummonCreature(NPC_DEATH_RAY, pos, TEMPSUMMON_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -780,7 +780,7 @@ public:
|
||||
|
||||
bird->KillSelf();
|
||||
crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(),
|
||||
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhaseMask(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
|
||||
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhases(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
|
||||
/// @todo Make crunchy perform emote eat when he reaches the bird
|
||||
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user