From aa818703c1efce8304f794b4c4d1fc2d14d10b46 Mon Sep 17 00:00:00 2001 From: NathanKell Date: Sun, 27 Jun 2021 19:43:01 -0700 Subject: [PATCH] Fix ResourceConsumptionChecker, would break on part count change Checks was reset when the active vessel's part count did not match the stored part count, but the stored part count was only updated on vessel switch, not when the local count of parts changed. Added missing line. This should fix a bug we are experiencing in RP-1 right now. --- .../Parameter/VesselParameter/ResourceConsuption.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ContractConfigurator/Parameter/VesselParameter/ResourceConsuption.cs b/source/ContractConfigurator/Parameter/VesselParameter/ResourceConsuption.cs index 738a47069..34ba5d0f1 100644 --- a/source/ContractConfigurator/Parameter/VesselParameter/ResourceConsuption.cs +++ b/source/ContractConfigurator/Parameter/VesselParameter/ResourceConsuption.cs @@ -64,6 +64,7 @@ void FixedUpdate() // Reset counter on vessel change if (partCount != localCount) { + partCount = localCount; checks = 0; }