Skip to content

Commit e1e00aa

Browse files
committed
Revert "Minor adjustments to number of wheels checking"
This reverts commit 1cee94c.
1 parent 1cee94c commit e1e00aa

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ public virtual void LoadFromWagFile(string wagFilePath)
436436
}
437437
}
438438

439-
// Ensure Drive Axles is set to a default if no OR value added to WAG file, assumes that WagonNumAxles only needs to be set on non locomotive cars
440-
if (WagonNumAxles == 0 && WagonType != WagonTypes.Engine)
439+
// Ensure Drive Axles is set to a default if no OR value added to WAG file
440+
if (WagonNumAxles == 0)
441441
{
442442
if (MSTSWagonNumWheels != 0 && MSTSWagonNumWheels < 6)
443443
{
@@ -2296,16 +2296,11 @@ private void UpdateTrainBaseResistance_DavisLowSpeed()
22962296
// Determine Axle loading of Car
22972297
if (WagonType == WagonTypes.Engine && IsPlayerTrain && Simulator.PlayerLocomotive is MSTSLocomotive locoParameters)
22982298
{
2299-
// This only takes into account the driven axles for 100% accuracy the non driven axles should also be considered
23002299
AxleLoadKg = locoParameters.DrvWheelWeightKg / locoParameters.LocoNumDrvAxles;
23012300
}
23022301
else
23032302
{
2304-
// Typically this loop should only be processed when it is a car of some descritption, and therefore it will use the wagon axles as it reference.
2305-
if (WagonNumAxles > 0)
2306-
{
2307-
AxleLoadKg = MassKG / WagonNumAxles;
2308-
}
2303+
AxleLoadKg = MassKG / WagonNumAxles;
23092304
}
23102305

23112306
// Calculate the track gradient based on wagon axle loading

0 commit comments

Comments
 (0)