respect `AttackState.PursueOnLOS` for DashDefensive state

godot-4.3
HumanoidSandvichDispenser 2024-01-11 01:26:17 -08:00
parent 9efcea7a70
commit 5567032557
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ public partial class DashDefensive : AttackState
}
}
if (PursueOnNoLOS && !NPC.HasLineOfSight(bestTarget))
{
return PursueState;
}
if (NPC.CanAttack && NPC.StunTime <= 0)
{
bool isTargetStunned = bestTarget.StunTime > 0;