From fb5bf38f5fcd36e65793261c2534ecd3f43a688e Mon Sep 17 00:00:00 2001 From: TheJebForge Date: Thu, 12 Jan 2023 19:38:05 +0200 Subject: [PATCH] Added check in case start was called again --- DesktopHandSwitch/DesktopHandSwitch.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DesktopHandSwitch/DesktopHandSwitch.cs b/DesktopHandSwitch/DesktopHandSwitch.cs index 59da35a..88e0da6 100644 --- a/DesktopHandSwitch/DesktopHandSwitch.cs +++ b/DesktopHandSwitch/DesktopHandSwitch.cs @@ -25,6 +25,7 @@ public class DesktopHandSwitch : NeosMod static DesktopHandSwitch modInstance; static Chirality initialChirality = Chirality.Right; + static bool initialChiralityWasSet; static DateTime lastSwitch = DateTime.UtcNow; ModConfiguration config; @@ -55,7 +56,10 @@ static Chirality OppositeChirality(Chirality chirality) { class CommonTool_OnStart_Patch { static void Postfix(CommonTool __instance) { + if (initialChiralityWasSet) return; + initialChirality = __instance.InputInterface.PrimaryHand; + initialChiralityWasSet = true; } }