mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Spell: Calculate GO rotation for SPELL_EFFECT_TRANS_DOOR
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user