Skip to content

Commit 248a43c

Browse files
committed
1.38.1 hotfix : fixed heatshields starting in the charred / black state due to incorrect initialization in the ModuleColorChangerOptimization patch.
1 parent cd53aac commit 248a43c

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
### Changelog
22

3+
##### 1.38.1
4+
**Bug fixes**
5+
- **ModuleColorChangerOptimization** : Fixed externally controlled ModuleColorChanger modules state being wrongly reset on startup, notably causing the stock heat shield to start in the charred / black state in the editor.
6+
37
##### 1.38.0
48
**New/improved patches**
59
- New performance patch : [**ModuleColorChangerOptimization**](https://github.com/KSPModdingLibs/KSPCommunityFixes/pull/304/) : Mostly eliminate the constant overhead from `ModuleColorChanger.Update()` by avoiding re-setting the shader property when the state hasn't changed.

GameData/KSPCommunityFixes/KSPCommunityFixes.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"NAME": "KSPCommunityFixes",
33
"URL": "https://raw.githubusercontent.com/KSPModdingLibs/KSPCommunityFixes/master/GameData/KSPCommunityFixes/KSPCommunityFixes.version",
44
"DOWNLOAD": "https://github.com/KSPModdingLibs/KSPCommunityFixes/releases",
5-
"VERSION": {"MAJOR": 1, "MINOR": 38, "PATCH": 0, "BUILD": 0},
5+
"VERSION": {"MAJOR": 1, "MINOR": 38, "PATCH": 1, "BUILD": 0},
66
"KSP_VERSION": {"MAJOR": 1, "MINOR": 12, "PATCH": 5},
77
"KSP_VERSION_MIN": {"MAJOR": 1, "MINOR": 8, "PATCH": 0},
88
"KSP_VERSION_MAX": {"MAJOR": 1, "MINOR": 12, "PATCH": 5}

KSPCommunityFixes/Performance/ModuleColorChangerOptimization.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ protected override void ApplyPatches()
1111

1212
static void ModuleColorChanger_Start_Postfix(ModuleColorChanger __instance)
1313
{
14-
__instance.SetState(__instance.currentRateState); // ensure initial state is correct
14+
if (__instance.useRate)
15+
__instance.SetState(__instance.currentRateState); // ensure initial state is correct
1516
}
1617

1718
static void ModuleColorChanger_FixedUpdate_Override(ModuleColorChanger mcc)

KSPCommunityFixes/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
// Revision
3131
//
3232
[assembly: AssemblyVersion("1.37.3.0")]
33-
[assembly: AssemblyFileVersion("1.38.0.0")]
33+
[assembly: AssemblyFileVersion("1.38.1.0")]
3434

35-
[assembly: KSPAssembly("KSPCommunityFixes", 1, 38, 0)]
35+
[assembly: KSPAssembly("KSPCommunityFixes", 1, 38, 1)]
3636
[assembly: KSPAssemblyDependency("MultipleModulePartAPI", 1, 0, 0)]
3737
[assembly: KSPAssemblyDependency("ModuleManager", 1, 0)]
3838
[assembly: KSPAssemblyDependency("HarmonyKSP", 1, 0)]

0 commit comments

Comments
 (0)