mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 11:09:19 +02:00
build 181117. load exchange time calculation improvement, pantograph tank pressure cab control, ui info panel vehicle selection tweak
This commit is contained in:
19
Driver.cpp
19
Driver.cpp
@@ -966,8 +966,8 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
|
||||
// perform loading/unloading
|
||||
auto const platformside = static_cast<int>( std::floor( std::abs( sSpeedTable[ i ].evEvent->input_value( 2 ) ) ) ) % 10;
|
||||
auto const exchangetime = std::max( 5.0, simulation::Station.update_load( pVehicles[ 0 ], *TrainParams, platformside ) );
|
||||
WaitingSet( std::max( -fStopTime, exchangetime ) ); // na końcu rozkładu się ustawia 60s i tu by było skrócenie
|
||||
auto const exchangetime = simulation::Station.update_load( pVehicles[ 0 ], *TrainParams, platformside );
|
||||
WaitingSet( exchangetime );
|
||||
|
||||
if( TrainParams->CheckTrainLatency() < 0.0 ) {
|
||||
// odnotowano spóźnienie
|
||||
@@ -1009,6 +1009,21 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// sitting at passenger stop
|
||||
if( fStopTime < 0 ) {
|
||||
// verify progress of load exchange
|
||||
auto exchangetime { 0.f };
|
||||
auto *vehicle { pVehicles[ 0 ] };
|
||||
while( vehicle != nullptr ) {
|
||||
exchangetime = std::max( exchangetime, vehicle->LoadExchangeTime() );
|
||||
vehicle = vehicle->Next();
|
||||
}
|
||||
if( exchangetime > 0 ) {
|
||||
WaitingSet( exchangetime );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (OrderCurrentGet() & Shunt) {
|
||||
OrderNext(Obey_train); // uruchomić jazdę pociągową
|
||||
|
||||
Reference in New Issue
Block a user