Core/Spell: Calculate GO rotation for SPELL_EFFECT_TRANS_DOOR

This commit is contained in:
ariel-
2016-08-28 07:15:03 -03:00
parent 9a3a728b25
commit f5a0342913

View File

@@ -5093,8 +5093,9 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
GameObject* pGameObj = new GameObject;
if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap,
m_caster->GetPhaseMask(), Position(fx, fy, fz, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY))
Position pos = { fx, fy, fz, m_caster->GetOrientation() };
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(m_caster->GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap, m_caster->GetPhaseMask(), pos, rot, 255, GO_STATE_READY))
{
delete pGameObj;
return;