From b11eaa8af892fb06fedb074bfaed6868b80ac144 Mon Sep 17 00:00:00 2001 From: CWX Date: Fri, 5 Jul 2024 17:46:55 +0100 Subject: [PATCH] fix reloadclientpatch --- project/SPT.Debugging/Patches/ReloadClientPatch.cs | 14 +------------- project/SPT.Debugging/SPT.Debugging.csproj | 1 + project/SPT.Debugging/SPTDebuggingPlugin.cs | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/project/SPT.Debugging/Patches/ReloadClientPatch.cs b/project/SPT.Debugging/Patches/ReloadClientPatch.cs index 7e8d083..ac6bb05 100644 --- a/project/SPT.Debugging/Patches/ReloadClientPatch.cs +++ b/project/SPT.Debugging/Patches/ReloadClientPatch.cs @@ -26,19 +26,7 @@ namespace SPT.Debugging.Patches "\nMay Cause Unexpected Behaviors inraid")] public static void Reload() { - - var tarkovapp = Reflection.Utils.ClientAppUtils.GetMainApp(); - GameWorld gameWorld = Singleton.Instance; - if (gameWorld != null && gameWorld.MainPlayer.Location != "hideout") - { - ConsoleScreen.LogError("You are in raid. Please only use in Mainmenu"); - return; // return early we dont want to cause errors because we are inraid - } - else if (gameWorld != null) - { - tarkovapp.HideoutControllerAccess.UnloadHideout(); - } - tarkovapp.method_49(); + Reflection.Utils.ClientAppUtils.GetMainApp().method_52().HandleExceptions(); } } } diff --git a/project/SPT.Debugging/SPT.Debugging.csproj b/project/SPT.Debugging/SPT.Debugging.csproj index c4996ca..51cd554 100644 --- a/project/SPT.Debugging/SPT.Debugging.csproj +++ b/project/SPT.Debugging/SPT.Debugging.csproj @@ -25,6 +25,7 @@ + diff --git a/project/SPT.Debugging/SPTDebuggingPlugin.cs b/project/SPT.Debugging/SPTDebuggingPlugin.cs index 95a0375..4559d66 100644 --- a/project/SPT.Debugging/SPTDebuggingPlugin.cs +++ b/project/SPT.Debugging/SPTDebuggingPlugin.cs @@ -29,7 +29,7 @@ namespace SPT.Debugging //new BTRDebugDataPatch().Enable(); //new PMCBotSpawnLocationPatch().Enable(); - //new ReloadClientPatch().Enable(); + new ReloadClientPatch().Enable(); } catch (Exception ex) {