fix: Fixes direction snapping when pathing to combatant for MeleeAI (#2187)
* fix: Fixes direction snapping when pathing to combatant * Fixes speed when exiting out of flee action
This commit is contained in:
parent
c1af2ade83
commit
2086e9b292
1 changed files with 7 additions and 1 deletions
|
|
@ -81,7 +81,11 @@ public class MeleeAI : BaseAI
|
|||
|
||||
if (!MoveTo(combatant, true, m_Mobile.RangeFight))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
if (m_Mobile.InRange(combatant, 1))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
}
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
|
|
@ -175,6 +179,8 @@ public class MeleeAI : BaseAI
|
|||
m_Mobile.DebugSay("I am stronger now, so I will continue fighting");
|
||||
}
|
||||
|
||||
m_Mobile.PlaySound(m_Mobile.GetAttackSound());
|
||||
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue