From e5be12e3f968a56ce8b1be0beeb24b969ae66fbc Mon Sep 17 00:00:00 2001 From: Jan Horacek Date: Sat, 21 Jan 2023 16:13:57 +0100 Subject: [PATCH] Save train elapsed distance as .2f. --- src/hv/THnaciVozidlo.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hv/THnaciVozidlo.pas b/src/hv/THnaciVozidlo.pas index aead4b4c..656d4a99 100644 --- a/src/hv/THnaciVozidlo.pas +++ b/src/hv/THnaciVozidlo.pas @@ -520,8 +520,8 @@ procedure THV.SaveState(ini: TMemIniFile); else ini.WriteString(addr, 'stanice', ''); - ini.WriteFloat(addr, 'najeto_vpred_metru', Self.state.traveled_forward); - ini.WriteFloat(addr, 'najeto_vzad_metru', Self.state.traveled_backward); + ini.WriteString(addr, 'najeto_vpred_metru', Format('%.2f', [Self.state.traveled_forward])); + ini.WriteString(addr, 'najeto_vzad_metru', Format('%.2f', [Self.state.traveled_backward])); ini.WriteInteger(addr, 'stanoviste_a', Integer(Self.state.siteA));