Fix fake error and also looking during attacks

This commit is contained in:
2025-02-25 22:20:04 -08:00
parent 221ade11e3
commit cfa79f262f
2 changed files with 15 additions and 15 deletions

View File

@@ -90,7 +90,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
return;
var lookDir = GlobalPosition + Velocity;
if (_enemyLogic.Value is not EnemyLogic.State.Attacking && (!lookDir.IsEqualApprox(GlobalPosition) || !Velocity.IsZeroApprox()))
if (!lookDir.IsEqualApprox(GlobalPosition) || !Velocity.IsZeroApprox())
LookAt(lookDir, Vector3.Up, true);
var isWalking = _enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer;