aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 190b8aa021f..079ebd059b4 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1984,7 +1984,7 @@ void Spell::EffectTeleportUnits(uint32 i)
float x = m_targets.m_destX;
float y = m_targets.m_destY;
float z = m_targets.m_destZ;
- float orientation = unitTarget->GetOrientation();
+ float orientation = m_targets.getUnitTarget() ? m_targets.getUnitTarget()->GetOrientation() : unitTarget->GetOrientation();
sLog.outDebug("Spell::EffectTeleportUnits - teleport unit to %u %f %f %f\n", mapid, x, y, z);
// Teleport
if(unitTarget->GetTypeId() == TYPEID_PLAYER)