Merge pull request #40 from H0zen/develop21
[Core] Clarify some issues regarding negative angles.
This commit is contained in:
commit
d4d9cca8b2
@ -978,7 +978,7 @@ void WorldObject::Relocate(float x, float y, float z, float orientation)
|
||||
m_position.x = x;
|
||||
m_position.y = y;
|
||||
m_position.z = z;
|
||||
m_position.o = orientation;
|
||||
m_position.o = MapManager::NormalizeOrientation(orientation);
|
||||
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
{ ((Unit*)this)->m_movementInfo.ChangePosition(x, y, z, orientation); }
|
||||
@ -996,7 +996,7 @@ void WorldObject::Relocate(float x, float y, float z)
|
||||
|
||||
void WorldObject::SetOrientation(float orientation)
|
||||
{
|
||||
m_position.o = orientation;
|
||||
m_position.o = MapManager::NormalizeOrientation(orientation);
|
||||
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
{ ((Unit*)this)->m_movementInfo.ChangeOrientation(orientation); }
|
||||
|
@ -2121,7 +2121,7 @@ void Spell::EffectSummon(SpellEffectIndex eff_idx)
|
||||
{
|
||||
// Summon in dest location
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
{ spawnCreature->Relocate(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, -m_caster->GetOrientation()); }
|
||||
{ spawnCreature->Relocate(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, m_caster->GetOrientation() + M_PI_F); }
|
||||
|
||||
// set timer for unsummon
|
||||
if (m_duration > 0)
|
||||
@ -2131,10 +2131,10 @@ void Spell::EffectSummon(SpellEffectIndex eff_idx)
|
||||
}
|
||||
|
||||
// Summon in dest location
|
||||
CreatureCreatePos pos(m_caster->GetMap(), m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, -m_caster->GetOrientation());
|
||||
CreatureCreatePos pos(m_caster->GetMap(), m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, m_caster->GetOrientation() + M_PI_F);
|
||||
|
||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
{ pos = CreatureCreatePos(m_caster, -m_caster->GetOrientation()); }
|
||||
{ pos = CreatureCreatePos(m_caster, m_caster->GetOrientation() + M_PI_F); }
|
||||
|
||||
Map* map = m_caster->GetMap();
|
||||
uint32 pet_number = sObjectMgr.GeneratePetNumber();
|
||||
@ -2585,7 +2585,7 @@ void Spell::EffectSummonGuardian(SpellEffectIndex eff_idx)
|
||||
|
||||
// If dest location if present
|
||||
// Summon 1 unit in dest location
|
||||
CreatureCreatePos pos(m_caster->GetMap(), m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, -m_caster->GetOrientation());
|
||||
CreatureCreatePos pos(m_caster->GetMap(), m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, m_caster->GetOrientation() + M_PI_F);
|
||||
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
{
|
||||
@ -2665,7 +2665,7 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffectIndex eff_idx)
|
||||
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectBoundingRadius(), dis);
|
||||
}
|
||||
|
||||
unitTarget->NearTeleportTo(fx, fy, fz, -m_caster->GetOrientation(), unitTarget == m_caster);
|
||||
unitTarget->NearTeleportTo(fx, fy, fz, m_caster->GetOrientation() + M_PI_F, unitTarget == m_caster);
|
||||
}
|
||||
|
||||
void Spell::EffectLearnSkill(SpellEffectIndex eff_idx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user