From 4cd17b78a24f73b7a9c7a9139ffcdd69d348549a Mon Sep 17 00:00:00 2001 From: Starwaster Date: Mon, 15 Aug 2022 13:51:10 -0400 Subject: [PATCH] set prevScale = scale when initializing Sets prevScale to scale in initializeScaling(). Fixes an issue where attach nodes get scaled incorrectly when loading a craft file. (possibly also when loading a vessel in the flight scene?) Issue is caused because prevScale defaults to 1 and through division by prevScale and multiplication by newScale, the node gets moved. This problem has apparently caused wheel instability. (I was not able to repro the instability but other players have and report that this change fixed the problem for them) Will not fix existing craft; craft files must be edited and fixed --- VSProject/KSPWheel/PartModules/KSPWheelBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/VSProject/KSPWheel/PartModules/KSPWheelBase.cs b/VSProject/KSPWheel/PartModules/KSPWheelBase.cs index 6a9c213..60c4327 100644 --- a/VSProject/KSPWheel/PartModules/KSPWheelBase.cs +++ b/VSProject/KSPWheel/PartModules/KSPWheelBase.cs @@ -773,6 +773,7 @@ public override string GetInfo() private void initializeScaling() { if (initializedScaling) { return; } + prevScale = scale; initializedScaling = true; setScale(scale, false); }