diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index f31abd04..6a5f15a7 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -9672,9 +9672,9 @@ bool TMoverParameters::RunCommand( std::string Command, double CValue1, double C } else if (Command == "DoorClose") /*NBMX*/ { // Ra: uwzględnić trzeba jeszcze zgodność sprzęgów - if( ( Doors.open_control == control_t::conductor ) - || ( Doors.open_control == control_t::driver ) - || ( Doors.open_control == control_t::mixed ) ) { + if( ( Doors.close_control == control_t::conductor ) + || ( Doors.close_control == control_t::driver ) + || ( Doors.close_control == control_t::mixed ) ) { // ignore remote command if the door is only operated locally if( true == Battery ) { diff --git a/driveruipanels.cpp b/driveruipanels.cpp index 2062fbd1..e30f921b 100644 --- a/driveruipanels.cpp +++ b/driveruipanels.cpp @@ -655,6 +655,10 @@ debug_panel::update_section_ai( std::vector &Output ) { // biezaca komenda dla AI auto textline = "Current order: " + mechanik.OrderCurrent(); + if( mechanik.fStopTime < 0.0 ) { + textline += "\n stop time: " + to_string( std::abs( mechanik.fStopTime ), 1 ); + } + Output.emplace_back( textline, Global.UITextColor ); if( ( mechanik.VelNext == 0.0 ) diff --git a/parser.cpp b/parser.cpp index 8c323acc..25bd9c3a 100644 --- a/parser.cpp +++ b/parser.cpp @@ -188,7 +188,7 @@ std::string cParser::readToken( bool ToLower, const char *Break ) { c = tolower( c ); token += c; if( findQuotes( token ) ) // do glue together words enclosed in quotes - break; + continue; if( trimComments( token ) ) // don't glue together words separated with comment break; } diff --git a/scene.cpp b/scene.cpp index 1fc6f706..f09ca8dd 100644 --- a/scene.cpp +++ b/scene.cpp @@ -124,7 +124,8 @@ basic_cell::update_events() { // event launchers for( auto *launcher : m_eventlaunchers ) { if( ( true == ( launcher->check_activation() && launcher->check_conditions() ) ) - && ( SquareMagnitude( launcher->location() - Global.pCamera.Pos ) < launcher->dRadius ) ) { + && ( ( launcher->dRadius < 0.0 ) + || ( SquareMagnitude( launcher->location() - Global.pCamera.Pos ) < launcher->dRadius ) ) ) { launch_event( launcher ); } diff --git a/station.cpp b/station.cpp index 7e9d4654..5fba4379 100644 --- a/station.cpp +++ b/station.cpp @@ -43,6 +43,8 @@ basic_station::update_load( TDynamicObject *First, Mtable::TTrainParameters &Sch auto ¶meters { *vehicle->MoverParameters }; + if( parameters.Doors.range == 0.f ) { goto next; } + if( parameters.LoadType.name.empty() ) { // (try to) set the cargo type for empty cars parameters.LoadAmount = 0.f; // safety measure against edge cases @@ -73,6 +75,7 @@ basic_station::update_load( TDynamicObject *First, Mtable::TTrainParameters &Sch exchangetime = std::max( exchangetime, vehicle->LoadExchangeTime() ); } } +next: vehicle = vehicle->Next(); }