Fix for stripping doafters (#30821)

Apparently I need to check if they're holding an item

Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-08-09 05:02:06 -07:00
committed by GitHub
parent c3e96b3770
commit 9f8ff021ea

View 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