From 6affdec7c6af56dd81d47033c0433fd3764ae48a Mon Sep 17 00:00:00 2001 From: fox Date: Thu, 19 Sep 2024 04:52:32 +0300 Subject: [PATCH] Fix --- Content.Shared/Floofstation/Leash/LeashSystem.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Floofstation/Leash/LeashSystem.cs b/Content.Shared/Floofstation/Leash/LeashSystem.cs index bb5356d6763..ca52d8928c0 100644 --- a/Content.Shared/Floofstation/Leash/LeashSystem.cs +++ b/Content.Shared/Floofstation/Leash/LeashSystem.cs @@ -167,6 +167,7 @@ private void OnJointRemoved(Entity ent, ref JointRemovedEvent || ent.Comp.Puller is not { } puller || !TryComp(ent.Comp.Anchor, out var anchor) || !TryComp(puller, out var leash) + || leash.Leashed.All(it => it.JointId != id) || !Transform(ent).Coordinates.TryDistance(EntityManager, Transform(puller).Coordinates, out var dst) || dst > leash.MaxDistance ) @@ -397,9 +398,6 @@ public void RemoveLeash(Entity leashed, Entity it.JointId == jointId).ToList(); @@ -407,6 +405,9 @@ public void RemoveLeash(Entity leashed, Entity