aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-04-22 12:19:34 +0200
committerMachiavelli <machiavelli.trinity@gmail.com>2011-04-22 12:19:34 +0200
commit6d0c97b06b964339e62f9b10608eb97fafa60dbc (patch)
tree83cc99bb94ee65ec929f37179bc62ad41386588b
parentc9a917ad793bf2bfdde44f2ef3c498ba41d45c6a (diff)
Core/SAI: Fix a possible crash in SMART_ACTION_SET_ORIENTATION with SMART_TARGET_SELF for TempSummons
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 2ab7c9fc11e..304d02334c2 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1238,7 +1238,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ObjectList* targets = GetTargets(e, unit);
if (e.GetTargetType() == SMART_TARGET_SELF)
- me->SetFacing(me->GetCreatureData()->orientation, NULL);
+ me->SetFacing(me->GetHomePosition().GetOrientation(), NULL);
else if (e.GetTargetType() == SMART_TARGET_POSITION)
me->SetFacing(e.target.o, NULL);
else if (targets && !targets->empty())