mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
minor bug fixes
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
|
||||
@@ -655,6 +655,10 @@ debug_panel::update_section_ai( std::vector<text_line> &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 )
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user