0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 01:10:45 -05:00

fix reloadclientpatch

This commit is contained in:
CWX 2024-07-05 17:46:55 +01:00
parent 7fff0596a8
commit b11eaa8af8
3 changed files with 3 additions and 14 deletions

View File

@ -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<GameWorld>.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();
}
}
}

View File

@ -25,6 +25,7 @@
<Reference Include="Comfort.Common" HintPath="..\Shared\Managed\Comfort.dll" Private="False" />
<Reference Include="DissonanceVoip" HintPath="..\Shared\Managed\DissonanceVoip.dll" Private="False" />
<Reference Include="Nlog" HintPath="..\Shared\Managed\NLog.dll" Private="False" />
<Reference Include="Nlog" HintPath="..\Shared\Managed\CommonExtensions.dll" Private="False" />
</ItemGroup>
<ItemGroup>

View File

@ -29,7 +29,7 @@ namespace SPT.Debugging
//new BTRDebugDataPatch().Enable();
//new PMCBotSpawnLocationPatch().Enable();
//new ReloadClientPatch().Enable();
new ReloadClientPatch().Enable();
}
catch (Exception ex)
{