Stop NPCs steering around non-hard fixtures (#8668)

This commit is contained in:
metalgearsloth
2022-06-05 19:42:02 +10:00
committed by GitHub
parent 93cbf32308
commit ed2c0cda97

View File

@@ -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;
}