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 deltanedas
parent 6365623a8d
commit c14712a4d4
1 changed files with 1 additions and 1 deletions

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