17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-07 16:54:50 +01:00

Keep a shut down AI out of the engine start hack, stop standing at spent cells

A vehicle left alone in a consist was starting its engine on its own: the
Wait_for_orders hack in handle_engine() takes a live 24V battery as a human
switching the vehicle on, and every vehicle a scenery starts with has one. The
guard for that was in master, commented out. With the engine running the driver
counted as active again, so a permitting signal went on to hand it Obey_train -
measured on td.scn: Prepare_engine 12 ms after the coupler was released, with
the signal still at stop.

A command cell keeps its text once the command has been delivered, which left
the point at zero velocity and hid the rest of the table behind it. The point is
now marked as sent and stops braking for it.

Also drops the parameter CommandClaimsPrimary() no longer reads, and puts the
brake release blocks in determine_consist_state() back at their original
indentation - the scope never changed, but the diff read as if it had.
This commit is contained in:
maj00r
2026-09-15 21:59:50 +02:00
parent 829e8b0938
commit 1e52bb43ba
2 changed files with 32 additions and 40 deletions

View File

@@ -518,7 +518,7 @@ public:
private:
void RecognizeCommand(); // odczytuje komende przekazana lokomotywie
// whether the command wakes a secondary crew up to lead (a driving or startup order)
static bool CommandClaimsPrimary( std::string const &Command, double const Value );
static bool CommandClaimsPrimary( std::string const &Command );
void JumpToNextOrder( bool const Skipmergedchangedirection = false );
void JumpToFirstOrder();
void OrderPush( TOrders NewOrder );