Fix sometimes bringing duplicate object to other system

This commit is contained in:
xen-42 2024-10-09 22:07:09 -04:00
parent f41b57a97e
commit a7560aa2c5

View File

@ -91,6 +91,9 @@ public static class HeldItemHandler
private static void OnStarSystemChanging(string _) private static void OnStarSystemChanging(string _)
{ {
// Double check we're still holding it
_currentlyHeldItem = Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItem()?.gameObject;
if (_currentlyHeldItem != null) if (_currentlyHeldItem != null)
{ {
// Track it so that when we return to this system we can delete the original // Track it so that when we return to this system we can delete the original