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

Tweak the door closing and warning signal delays

- The warning signal is no longer going to be played for an obnoxiously long amount of time by AI drivers when driving vehicles with a manual warning signal switch, most notably EN57.
  - A new `moveDepartureWarned` driving flag has been created to accomodate this behavior.
- Added the action time counter and the missing driving flags to the Vehicle AI section.
This commit is contained in:
jakubg1
2026-04-04 00:13:26 +02:00
parent d13c27a7eb
commit 407b187688
3 changed files with 55 additions and 51 deletions

View File

@@ -1138,9 +1138,12 @@ debug_panel::update_section_ai( std::vector<text_line> &Output ) {
"Current order: [" + std::to_string( mechanik.OrderPos ) + "] "
+ mechanik.Order2Str( mechanik.OrderCurrentGet() );
if( mechanik.fStopTime < 0.0 ) {
textline += "\n stop time: " + to_string( std::abs( mechanik.fStopTime ), 1 );
}
if( mechanik.fStopTime < 0.0 ) {
textline += "\n stop time: " + to_string( std::abs( mechanik.fStopTime ), 1 );
}
if( mechanik.fActionTime < 0.0 ) {
textline += "\n action time: " + to_string( std::abs( mechanik.fActionTime ), 1 );
}
Output.emplace_back( textline, Global.UITextColor );
@@ -1231,7 +1234,8 @@ debug_panel::update_section_ai( std::vector<text_line> &Output ) {
std::vector<std::string> const drivingflagnames {
"StopCloser", "StopPoint", "Active", "Press", "Connect", "Primary", "Late", "StopHere",
"StartHorn", "StartHornNow", "StartHornDone", "Oerlikons", "IncSpeed", "TrackEnd", "SwitchFound", "GuardSignal",
"Visibility", "DoorOpened", "PushPull", "SignalFound", "StopPointFound" /*"SemaphorWasElapsed", "TrainInsideStation", "SpeedLimitFound"*/ };
"Visibility", "DoorOpened", "PushPull", "SignalFound", "StopPointFound", "GuardOpenDoor", "DepartureWarned"
/*"SemaphorWasElapsed", "TrainInsideStation", "SpeedLimitFound"*/ };
textline = "Driving flags:";
for( int idx = 0, flagbit = 1; idx < drivingflagnames.size(); ++idx, flagbit <<= 1 ) {