aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-13 14:28:28 -0600
committermegamage <none@none>2009-03-13 14:28:28 -0600
commitbb7391f129e831cd5daac17d54245738571c5d32 (patch)
treedd670fdf2fa6065af4bbbf2d027e72b5e1b70c9a /src
parent5e4986ad3a2f4f70e1754b94d5ca631a4f193774 (diff)
*Update event ai. Do not clear motionmaster.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/creature/mob_event_ai.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
index d6396dfae99..54b29e07651 100644
--- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
+++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
@@ -684,7 +684,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
AttackDistance = 0;
AttackAngle = 0;
- m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
}
@@ -799,19 +798,13 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
//Allow movement (create new targeted movement gen if none exist already)
if (CombatMovementEnabled)
{
- if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
- {
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
- }
+ m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
}
else
- if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
- {
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->GetMotionMaster()->MoveIdle();
- m_creature->StopMoving();
- }
+ {
+ m_creature->GetMotionMaster()->MoveIdle();
+ m_creature->StopMoving();
+ }
}
break;
case ACTION_T_SET_PHASE:
@@ -881,8 +874,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
if (CombatMovementEnabled)
{
- //Drop current movement gen
- m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
}
}