File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ public virtual void LoadFromWagFile(string wagFilePath)
483
483
}
484
484
485
485
// Ensure Drive Axles is set to a default if no OR value added to WAG file
486
- if ( WagonNumAxles == 0 )
486
+ if ( WagonNumAxles == 0 && WagonType != WagonTypes . Engine )
487
487
{
488
488
if ( MSTSWagonNumWheels != 0 && MSTSWagonNumWheels < 6 )
489
489
{
@@ -2409,11 +2409,16 @@ private void UpdateTrainBaseResistance_DavisLowSpeed()
2409
2409
// Determine Axle loading of Car
2410
2410
if ( WagonType == WagonTypes . Engine && IsPlayerTrain && Simulator . PlayerLocomotive is MSTSLocomotive locoParameters )
2411
2411
{
2412
+ // This only takes into account the driven axles for 100% accuracy the non driven axles should also be considered
2412
2413
AxleLoadKg = locoParameters . DrvWheelWeightKg / locoParameters . LocoNumDrvAxles ;
2413
2414
}
2414
2415
else
2415
2416
{
2416
- AxleLoadKg = MassKG / WagonNumAxles ;
2417
+ // Typically this loop should only be processed when it is a car of some description, and therefore it will use the wagon axles as it reference.
2418
+ if ( WagonNumAxles > 0 )
2419
+ {
2420
+ AxleLoadKg = MassKG / WagonNumAxles ;
2421
+ }
2417
2422
}
2418
2423
2419
2424
// Calculate the track gradient based on wagon axle loading
You can’t perform that action at this time.
0 commit comments