aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 2933f8b4109..b9bd0aeedea 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -870,7 +870,9 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
if (!me) return;
ObjectList* targets = GetTargets(e, unit);
- if (e.GetTargetType() == SMART_TARGET_POSITION)
+ if (e.GetTargetType() == SMART_TARGET_SELF)
+ me->SetFacing(me->GetCreatureData()->orientation, NULL);
+ else if (e.GetTargetType() == SMART_TARGET_POSITION)
me->SetFacing(e.target.o, NULL);
else if (targets && !targets->empty())
me->SetFacing(0, (*targets->begin()));