From 5d94fcdb2d2ef90d5aea2311e1fb2f0d3fe9244f Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 12 Dec 2021 10:34:55 +0000 Subject: [PATCH] reset game save --- QSB/SaveSync/Events/GameStateEvent.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/QSB/SaveSync/Events/GameStateEvent.cs b/QSB/SaveSync/Events/GameStateEvent.cs index b8b257fc..cfcc5545 100644 --- a/QSB/SaveSync/Events/GameStateEvent.cs +++ b/QSB/SaveSync/Events/GameStateEvent.cs @@ -28,6 +28,14 @@ namespace QSB.SaveSync.Events public override void OnReceiveRemote(bool isHost, GameStateMessage message) { + if (QSBSceneManager.CurrentScene != OWScene.TitleScreen) + { + DebugLog.ToConsole($"Error - Treid to handle GameStateEvent when not in TitleScreen!", OWML.Common.MessageType.Error); + return; + } + + PlayerData.ResetGame(); + var gameSave = StandaloneProfileManager.SharedInstance.currentProfileGameSave; gameSave.loopCount = message.LoopCount; gameSave.knownFrequencies = message.KnownFrequencies;