*Update event ai. Do not clear motionmaster.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-13 14:28:28 -06:00
parent 5e4986ad3a
commit bb7391f129
@@ -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,16 +798,10 @@ 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);
}
}
else
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
{
m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
}
@@ -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);
}
}