mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix: Break do_after if target/tool becomes inaccessible (#35079)
This commit is contained in:
parent
024301e698
commit
cea8dea005
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue