Skip to content

Commit 9d6f01e

Browse files
committed
ORTS_ODOMETER: enables also display of decimal values
1 parent ed80ad6 commit 9d6f01e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5031,16 +5031,16 @@ public virtual float GetDataOf(CabViewControl cvc)
50315031
switch (cvc.Units)
50325032
{
50335033
case CABViewControlUnits.KILOMETRES:
5034-
data = float.Parse(Math.Round(OdometerM / 1000, 0).ToString());
5034+
data = OdometerM / 1000;
50355035
break;
50365036
case CABViewControlUnits.MILES:
5037-
data = (float)Math.Round(Me.ToMi(OdometerM), 0);
5037+
data = (float)Me.ToMi(OdometerM);
50385038
break;
50395039
case CABViewControlUnits.FEET:
5040-
data = (float)Math.Round(Me.ToFt(OdometerM), 0);
5040+
data = (float)Me.ToFt(OdometerM);
50415041
break;
50425042
case CABViewControlUnits.YARDS:
5043-
data = (float)Math.Round(Me.ToYd(OdometerM), 0);
5043+
data = (float)Me.ToYd(OdometerM);
50445044
break;
50455045
case CABViewControlUnits.METRES:
50465046
default:

0 commit comments

Comments
 (0)