Skip to content

Commit 254b6d4

Browse files
committed
Small adjustment to the previous commit
1 parent 707560c commit 254b6d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ public virtual void LoadFromWagFile(string wagFilePath)
706706

707707
}
708708

709-
void setIfNonZero(ref float result, float? value) { if (value > 0) result = (float)value; }
709+
void setIfNonZero(ref float result, float? value) { if (value != null && value != 0) result = (float)value; }
710710

711711
// Read freight animation values from animation INCLUDE files
712712
// Read (initialise) "common" (empty values first).

0 commit comments

Comments
 (0)