From 847cafc121d1fb2557178e6832225ece486fcadb Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Sun, 3 Feb 2013 00:38:34 +0100 Subject: Scripts/Misc: Some code optimisations --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0536d8c7317..690e87ae19c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1898,7 +1898,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) - if (IsCreature(*itr)) + if (Creature* creature = (*itr)->ToCreature()) { (*itr)->ToCreature()->GetMotionMaster()->Clear(); (*itr)->ToCreature()->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); -- cgit v1.2.3