16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 07:49:19 +02:00

build 180622. time zone bias calculation fix, track events fix, passenger stop distance calculation fix

This commit is contained in:
tmj-fstate
2018-06-22 18:24:48 +02:00
parent c0bf973c58
commit c40d0abcf9
9 changed files with 79 additions and 45 deletions

View File

@@ -873,11 +873,12 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
auto Par1 = sSpeedTable[i].evEvent->ValueGet(1);
auto Par2 = sSpeedTable[i].evEvent->ValueGet(2);
if ((Par2 > 0) || (fLength < -Par2)) { //użyj tego W4
if (Par1 < 0) { //środek
L = -Par1 - fMinProximityDist - fLength * 0.5;
}
if (Par1 < 0) {
L = -Par1;
}
else {
L = Par1;
//środek
L = Par1 - fMinProximityDist - fLength * 0.5;
}
L = std::max(0.0, std::min(L, std::abs(Par2) - fMinProximityDist - fLength));
sSpeedTable[i].UpdateDistance(L);