Skip to content

Commit e967e32

Browse files
committed
Automatic merge of T1.6-rc3-30-gdf7bf1a26 and 12 pull requests
- Pull request #1104 at c039a26: Handle simple adhesion within the axle module - Pull request #1057 at 1c2bcb4: Switchable brake system - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1091 at 7fc8de1: Automatic speed control - Pull request #1110 at 387388e: Fix Activity Runner persists after loading exception - Pull request #1115 at 270f22f: Do not activate ETS switch if no suitable cars are attached - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1123 at dc286f5: Handle null control active locomotive - Pull request #1125 at 7a4f055: Lift #1096 into 1.6 release - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1124 at fab5457: Built-in PBL2 brake controller
14 parents 5551d94 + df7bf1a + c039a26 + 1c2bcb4 + e10390b + 7fc8de1 + 387388e + 270f22f + 91d2d26 + dc286f5 + 7a4f055 + 5845a1a + 689494b + fab5457 commit e967e32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ public void Save(BinaryWriter outf)
796796
outf.Write(DynamicBrakePriority);
797797
outf.Write((int)SpeedRegMode);
798798
outf.Write((int)SpeedSelMode);
799-
outf.Write(TrainBrakePercent);
799+
outf.Write(TrainBrakePercent ?? -1);
800800
outf.Write(TrainLengthMeters);
801801
outf.Write(CCIsUsingTrainBrake);
802802
}
@@ -814,6 +814,7 @@ public void Restore(BinaryReader inf)
814814
SpeedRegMode = (SpeedRegulatorMode)inf.ReadInt32();
815815
SpeedSelMode = (SpeedSelectorMode)inf.ReadInt32();
816816
TrainBrakePercent = inf.ReadSingle();
817+
if (TrainBrakePercent < 0) TrainBrakePercent = null;
817818
TrainLengthMeters = inf.ReadInt32();
818819
CCIsUsingTrainBrake = inf.ReadBoolean();
819820
}

0 commit comments

Comments
 (0)