Revert "Fix: Break do_after if target/tool becomes inaccessible" (#39617)

This commit is contained in:
Myra 2025-08-13 22:07:46 +02:00 committed by Vanessa
parent bbfe148566
commit 2248a65a1f
1 changed files with 4 additions and 4 deletions

View File

@ -184,22 +184,22 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
}
}
// Whether the user and the target are too far apart or they are inaccessible.
// Whether the user and the target are too far apart.
if (args.Target != null)
{
if (args.DistanceThreshold != null)
{
if (!_interaction.InRangeAndAccessible(args.User, args.Target.Value, args.DistanceThreshold.Value))
if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value, args.DistanceThreshold.Value))
return true;
}
}
// Whether the distance between the tool and the user has grown too much or they became inaccessible.
// Whether the distance between the tool and the user has grown too much.
if (args.Used != null)
{
if (args.DistanceThreshold != null)
{
if (!_interaction.InRangeAndAccessible(args.User,
if (!_interaction.InRangeUnobstructed(args.User,
args.Used.Value,
args.DistanceThreshold.Value))
return true;