We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 563fe9d commit 70a1325Copy full SHA for 70a1325
Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs
@@ -1976,7 +1976,10 @@ public override void Update(float elapsedClockSeconds)
1976
}
1977
1978
// Updates the mass of the wagon considering all types of loads
1979
- if (FreightAnimations.WagonEmptyWeight != -1) MassKG = FreightAnimations.WagonEmptyWeight + FreightAnimations.FreightWeight + FreightAnimations.StaticFreightWeight + totalContainerMassKG;
+ if (FreightAnimations != null && FreightAnimations.WagonEmptyWeight != -1)
1980
+ {
1981
+ MassKG = FreightAnimations.WagonEmptyWeight + FreightAnimations.FreightWeight + FreightAnimations.StaticFreightWeight + totalContainerMassKG;
1982
+ }
1983
1984
1985
0 commit comments