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

reverted pantograph control changes, removed some of the type conversion warnings

This commit is contained in:
tmj-fstate
2017-07-28 20:28:08 +02:00
parent 9b4dc83a2d
commit 3a26ccb2fd
15 changed files with 211 additions and 433 deletions

View File

@@ -507,7 +507,7 @@ void TController::TableTraceRoute(double fDistance, TDynamicObject *pVehicle)
fCurrentDistance = lastspeedpoint.fDist;
// nie doliczac dlugosci gdy: miniety początek lub jazda do konca toru
fTrackLength = (
( lastspeedpoint.iFlags & ( spElapsed | spEnd ) != 0 ) ?
( ( lastspeedpoint.iFlags & ( spElapsed | spEnd ) ) != 0 ) ?
0.0 :
pTrack->Length() );
}
@@ -1331,7 +1331,7 @@ void TController::TablePurger()
for( std::size_t idx = 0; idx < sSpeedTable.size() - 1; ++idx ) {
auto const &speedpoint = sSpeedTable[ idx ];
if( ( 0 == ( speedpoint.iFlags & spEnabled ) )
|| ( ( speedpoint.iFlags & ( spElapsed | spTrack | spCurve | spSwitch ) == ( spElapsed | spTrack | spCurve ) )
|| ( ( ( speedpoint.iFlags & ( spElapsed | spTrack | spCurve | spSwitch ) ) == ( spElapsed | spTrack | spCurve ) )
&& ( speedpoint.fVelNext < 0.0 ) ) ) {
// NOTE: we could break out early here, but running through entire thing gives us exact size needed for new table
++trimcount;
@@ -1353,7 +1353,7 @@ void TController::TablePurger()
}
auto const &speedpoint = sSpeedTable[ idx ];
if( ( 0 == ( speedpoint.iFlags & spEnabled ) )
|| ( ( speedpoint.iFlags & ( spElapsed | spTrack | spCurve | spSwitch ) == ( spElapsed | spTrack | spCurve ) )
|| ( ( ( speedpoint.iFlags & ( spElapsed | spTrack | spCurve | spSwitch ) ) == ( spElapsed | spTrack | spCurve ) )
&& ( speedpoint.fVelNext < 0.0 ) ) ) {
// if the trimmed point happens to be currently active semaphor we need to invalidate their placements
if( idx == SemNextIndex ) {