mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 04:39:18 +02:00
build 170815.
This commit is contained in:
21
Driver.cpp
21
Driver.cpp
@@ -659,22 +659,13 @@ void TController::TableTraceRoute(double fDistance, TDynamicObject *pVehicle)
|
|||||||
if( ( iLast == -1 )
|
if( ( iLast == -1 )
|
||||||
|| ( false == TestFlag( sSpeedTable[iLast].iFlags, spEnabled | spEnd ) ) ) {
|
|| ( false == TestFlag( sSpeedTable[iLast].iFlags, spEnabled | spEnd ) ) ) {
|
||||||
// only if we haven't already marked end of the track
|
// only if we haven't already marked end of the track
|
||||||
if( tLast == sSpeedTable[ iLast ].trTrack ) {
|
if( TableAddNew() ) {
|
||||||
// don't add the same track twice, it messes up distance calculations in speed point update
|
// zapisanie ostatniego sprawdzonego toru
|
||||||
sSpeedTable[ iLast ].iFlags |= (
|
sSpeedTable[iLast].Set(
|
||||||
fLastDir < 0 ?
|
tLast, fCurrentDistance,
|
||||||
|
( fLastDir < 0 ?
|
||||||
spEnabled | spEnd | spReverse :
|
spEnabled | spEnd | spReverse :
|
||||||
spEnabled | spEnd );
|
spEnabled | spEnd ));
|
||||||
}
|
|
||||||
else {
|
|
||||||
if( TableAddNew() ) {
|
|
||||||
// zapisanie ostatniego sprawdzonego toru
|
|
||||||
sSpeedTable[ iLast ].Set(
|
|
||||||
tLast, fCurrentDistance,
|
|
||||||
( fLastDir < 0 ?
|
|
||||||
spEnabled | spEnd | spReverse :
|
|
||||||
spEnabled | spEnd ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// to ostatnia pozycja, bo NULL nic nie da, a może się podpiąć obrotnica, czy jakieś transportery
|
// to ostatnia pozycja, bo NULL nic nie da, a może się podpiąć obrotnica, czy jakieś transportery
|
||||||
|
|||||||
Reference in New Issue
Block a user