diff --git a/Scripts/GlobalState.cs b/Scripts/GlobalState.cs index d66d4d63..0c0ab6ce 100644 --- a/Scripts/GlobalState.cs +++ b/Scripts/GlobalState.cs @@ -98,13 +98,12 @@ public partial class GlobalState : Node private void DeferredGotoScene(string path, MapStartDataResource startData = null) { - // if (InventoryManager.Instance is not null) - // { - // SessionSettings.Items = InventoryManager.Instance.Save(); - // } - // It is now safe to remove the current scene. CurrentScene.Free(); + + //var sceneParent = CurrentScene.GetParent(); + //sceneParent.RemoveChild(CurrentScene); + //sceneParent.QueueFree(); // Load a new scene. var nextScene = GD.Load(path); @@ -128,9 +127,10 @@ public partial class GlobalState : Node DeferredAddStartDataToGameManager(startData); } - if (GameManager.Instance is not null) { - GameManager.Instance.ApplySessionState(SessionSettings); - } + // Do not do this here because it might get the old gamemanager instead + // if (GameManager.Instance is not null) { + // GameManager.Instance.ApplySessionState(SessionSettings); + // } FadeIn(); }