From a16328acfab2e0a666b58a9092050a8cbca67279 Mon Sep 17 00:00:00 2001 From: firleju Date: Tue, 13 Sep 2016 06:46:13 +0200 Subject: [PATCH] =?UTF-8?q?Poprawki=20po=20=C5=82=C4=85czeniu=20wersji=20w?= =?UTF-8?q?=20wywo=C5=82aniu=20funkcji=20DynObj::DestinationSet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Driver.cpp | 5 +++-- mtable.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Driver.cpp b/Driver.cpp index 146caafa..b0453e16 100644 --- a/Driver.cpp +++ b/Driver.cpp @@ -1874,7 +1874,8 @@ bool TController::CheckVehicles(TOrders user) { if (TrainParams) if (p->asDestination == "none") - p->DestinationSet(TrainParams->Relation2, TrainParams->TrainName); // relacja docelowa, je�li nie by�o + p->DestinationSet(AnsiString(TrainParams->Relation2.c_str()), + AnsiString(TrainParams->TrainName.c_str())); // relacja docelowa, je�li nie by�o if (AIControllFlag) // je�li prowadzi komputer p->RaLightsSet(0, 0); // gasimy �wiat�a if (p->MoverParameters->EnginePowerSource.SourceType == CurrentCollector) @@ -2985,7 +2986,7 @@ bool TController::PutCommand(AnsiString NewCommand, double NewValue1, double New TDynamicObject *p = pVehicles[0]; while (p) { - p->DestinationSet(NewCommand, TrainParams->TrainName); // relacja docelowa + p->DestinationSet(NewCommand, AnsiString(TrainParams->TrainName.c_str())); // relacja docelowa p = p->Next(); // pojazd pod��czony od ty�u (licz�c od czo�a) } } diff --git a/mtable.cpp b/mtable.cpp index 6c0476f5..07fea6a2 100644 --- a/mtable.cpp +++ b/mtable.cpp @@ -39,7 +39,7 @@ double CompareTime(double t1h, double t1m, double t2h, double t2m) /*roznica cza double TTrainParameters::CheckTrainLatency() { - if ((LastStationLatency > 1.0) || (LastStationLatency < -1.0)) + if ((LastStationLatency > 1.0) || (LastStationLatency < 0)) return LastStationLatency; /*spoznienie + lub do przodu - z tolerancja 1 min*/ else return 0;