Skip to content

Commit

Permalink
Added check in case start was called again
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJebForge committed Jan 12, 2023
1 parent 1f5c92a commit fb5bf38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DesktopHandSwitch/DesktopHandSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit fb5bf38

Please sign in to comment.