Skip to content

Commit f46b49d

Browse files
committed
Automatic merge of T1.6-126-gc9409918f and 11 pull requests
- Pull request #1082 at 8538170: Allow variable water level in glass gauge - Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1091 at 492795a: Automatic speed control - Pull request #1122 at b9b077b: Wagon Size and Centering Controls - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1128 at d116396: Particle Emitter Overhaul - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9. - Pull request #1164 at 1ad9889: Fix: F9 crashes with a front coupled single steam locomotive by Csantucci. - Pull request #1165 at aacd11b: docs: Add code guidelines for logging
13 parents f6fdd67 + c940991 + 8538170 + f46d5f2 + 492795a + b9b077b + e241a0d + d116396 + 39cd994 + 48c9a63 + 2f9e292 + 1ad9889 + aacd11b commit f46b49d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,13 +1424,13 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
14241424
InitialCentreOfGravityM.Y = stf.ReadFloat(STFReader.UNITS.Distance, 0);
14251425
InitialCentreOfGravityM.Z = stf.ReadFloat(STFReader.UNITS.Distance, 0);
14261426

1427-
if (Math.Abs(InitialCentreOfGravityM.Z) > 2)
1428-
{
1429-
STFException.TraceWarning(stf, string.Format("CentreOfGravity Z set to zero because value {0} outside range -2 to +2", InitialCentreOfGravityM.Z));
1430-
InitialCentreOfGravityM.Z = 0;
1431-
}
1427+
if (Math.Abs(InitialCentreOfGravityM.Z) > 2)
1428+
{
1429+
STFException.TraceWarning(stf, string.Format("CentreOfGravity Z set to zero because value {0} outside range -2 to +2", InitialCentreOfGravityM.Z));
1430+
InitialCentreOfGravityM.Z = 0;
1431+
}
14321432

1433-
stf.SkipRestOfBlock();
1433+
stf.SkipRestOfBlock();
14341434
}
14351435
else // User has entered a single value, only set the Y component to this value, leave other components unchanged
14361436
{

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,10 @@ public virtual void Initialize()
816816

817817
if (maxBrakeShoeForcekN > 20 && Simulator.Settings.VerboseConfigurationMessages)
818818
{
819-
Trace.TraceInformation("Maximum force per brakeshoe is {0} and has exceeded {1}, check MaxBrakeShoeForceN {2} or NumberCarBrakeShoes {3}", FormatStrings.FormatForce(maxBrakeShoeForcekN * 1000, IsMetric), FormatStrings.FormatForce(20 * 1000, IsMetric), FormatStrings.FormatForce(MaxBrakeShoeForceN, IsMetric), NumberCarBrakeShoes);
819+
Trace.TraceInformation("Maximum force per brakeshoe is {0} and has exceeded {1}, check MaxBrakeShoeForceN {2} or NumberCarBrakeShoes {3}", FormatStrings.FormatForce(maxBrakeShoeForcekN * 1000, IsMetric), FormatStrings.FormatForce(20 * 1000, IsMetric), FormatStrings.FormatForce(MaxBrakeShoeForceN, IsMetric), NumberCarBrakeShoes);
820820
}
821-
}
822-
821+
}
822+
823823
//CurveForceFilter.Initialize();
824824

825825
// Initialize tunnel resistance values
@@ -1029,7 +1029,7 @@ public virtual void Update(float elapsedClockSeconds)
10291029
InitializeCarTemperatures();
10301030
AmbientTemperatureInitialised = true;
10311031
}
1032-
1032+
10331033
// Update temperature variation for height of car above sea level
10341034
// Typically in clear conditions there is a 9.8 DegC variation for every 1000m (1km) rise, in snow/rain there is approx 5.5 DegC variation for every 1000m (1km) rise
10351035
float TemperatureHeightVariationDegC = 0;
@@ -1044,9 +1044,9 @@ public virtual void Update(float elapsedClockSeconds)
10441044
{
10451045
TemperatureHeightVariationDegC = Me.ToKiloM(CarHeightAboveSeaLevelM) * DryLapseTemperatureC;
10461046
}
1047-
1047+
10481048
TemperatureHeightVariationDegC = MathHelper.Clamp(TemperatureHeightVariationDegC, 0.00f, 30.0f);
1049-
1049+
10501050
CarOutsideTempC = InitialCarOutsideTempC - TemperatureHeightVariationDegC;
10511051

10521052
AbsSpeedMpS = Math.Abs(_SpeedMpS);

0 commit comments

Comments
 (0)