From ed2c0cda97ece37f0d325a057259670bd7bf90c8 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 5 Jun 2022 19:42:02 +1000 Subject: [PATCH] Stop NPCs steering around non-hard fixtures (#8668) --- Content.Server/AI/Steering/AiSteeringSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/AI/Steering/AiSteeringSystem.cs b/Content.Server/AI/Steering/AiSteeringSystem.cs index 0ffe5c5e83..a60947dab8 100644 --- a/Content.Server/AI/Steering/AiSteeringSystem.cs +++ b/Content.Server/AI/Steering/AiSteeringSystem.cs @@ -660,7 +660,8 @@ namespace Content.Server.AI.Steering // So if 2 entities are moving towards each other and both detect a collision they'll both move in the same direction // i.e. towards the right if (EntityManager.TryGetComponent(physicsEntity, out IPhysBody? otherPhysics) && - Vector2.Dot(otherPhysics.LinearVelocity, direction) > 0) + (!otherPhysics.Hard || + Vector2.Dot(otherPhysics.LinearVelocity, direction) > 0)) { continue; }