]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix for stripping doafters (#30821)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Fri, 9 Aug 2024 12:02:06 +0000 (05:02 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Aug 2024 12:02:06 +0000 (22:02 +1000)
Apparently I need to check if they're holding an item

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs

index 213dc624b262e76da8a545b763d4bad0ca566013..f9718be52de3ca4293dbdcda422f2367ff001a96 100644 (file)
@@ -229,7 +229,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
 
             // If an item was in the user's hand to begin with,
             // check if the user is no longer holding the item.
-            if (args.BreakOnDropItem && !_hands.IsHolding((args.User, hands), doAfter.InitialItem))
+            if (args.BreakOnDropItem && doAfter.InitialItem != null && !_hands.IsHolding((args.User, hands), doAfter.InitialItem))
                     return true;
 
             // If the user changes which hand is active at all, interrupt the do-after