*Update event ai. Do not clear motionmaster.
--HG-- branch : trunk
This commit is contained in:
@@ -684,7 +684,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
AttackDistance = 0;
|
AttackDistance = 0;
|
||||||
AttackAngle = 0;
|
AttackAngle = 0;
|
||||||
|
|
||||||
m_creature->GetMotionMaster()->Clear(false);
|
|
||||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
|
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)
|
//Allow movement (create new targeted movement gen if none exist already)
|
||||||
if (CombatMovementEnabled)
|
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
|
else
|
||||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
|
||||||
{
|
{
|
||||||
m_creature->GetMotionMaster()->Clear(false);
|
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
m_creature->StopMoving();
|
m_creature->StopMoving();
|
||||||
}
|
}
|
||||||
@@ -881,8 +874,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
|
|
||||||
if (CombatMovementEnabled)
|
if (CombatMovementEnabled)
|
||||||
{
|
{
|
||||||
//Drop current movement gen
|
|
||||||
m_creature->GetMotionMaster()->Clear(false);
|
|
||||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
|
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user