From a7560aa2c55689dcac192b998151644312c42912 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 9 Oct 2024 22:07:09 -0400 Subject: [PATCH] Fix sometimes bringing duplicate object to other system --- NewHorizons/Handlers/HeldItemHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NewHorizons/Handlers/HeldItemHandler.cs b/NewHorizons/Handlers/HeldItemHandler.cs index 14ee0814..80c2f695 100644 --- a/NewHorizons/Handlers/HeldItemHandler.cs +++ b/NewHorizons/Handlers/HeldItemHandler.cs @@ -91,6 +91,9 @@ public static class HeldItemHandler private static void OnStarSystemChanging(string _) { + // Double check we're still holding it + _currentlyHeldItem = Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItem()?.gameObject; + if (_currentlyHeldItem != null) { // Track it so that when we return to this system we can delete the original