From cea8dea005e18be2656632bc2036550e7d0d2245 Mon Sep 17 00:00:00 2001 From: Winkarst-cpu <74284083+Winkarst-cpu@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:35:35 +0300 Subject: [PATCH] Fix: Break do_after if target/tool becomes inaccessible (#35079) --- Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs index 31ff034809..97ff74f64a 100644 --- a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs +++ b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs @@ -184,22 +184,22 @@ public abstract partial class SharedDoAfterSystem : EntitySystem } } - // Whether the user and the target are too far apart. + // Whether the user and the target are too far apart or they are inaccessible. if (args.Target != null) { if (args.DistanceThreshold != null) { - if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value, args.DistanceThreshold.Value)) + if (!_interaction.InRangeAndAccessible(args.User, args.Target.Value, args.DistanceThreshold.Value)) return true; } } - // Whether the distance between the tool and the user has grown too much. + // Whether the distance between the tool and the user has grown too much or they became inaccessible. if (args.Used != null) { if (args.DistanceThreshold != null) { - if (!_interaction.InRangeUnobstructed(args.User, + if (!_interaction.InRangeAndAccessible(args.User, args.Used.Value, args.DistanceThreshold.Value)) return true; -- 2.51.2