From 8fbf05674936bebf346f2da4b851dbd6b8d834f6 Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Thu, 22 Oct 2026 18:01:04 +0200 Subject: [PATCH] fix(ai): a road order holding the vehicle keeps the road orders past it from telling the vehicle to drive on --- vehicle/Driver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vehicle/Driver.cpp b/vehicle/Driver.cpp index f37a591a..11c37b29 100644 --- a/vehicle/Driver.cpp +++ b/vehicle/Driver.cpp @@ -1655,6 +1655,12 @@ TController::TableUpdateEvent( double &Velocity, TCommandType &Command, TSpeedPo Point.Clear(); } } + else if (Point.fDist > 0.0 && typeid(*Point.evEvent) == typeid(road_order)) + { + // a level crossing or a junction which holds the vehicle ahead: the road orders past it, which let the traffic + // through, aren't for this vehicle yet. without this the first of them would tell the standing vehicle to drive on + Command = TCommandType::cm_SetProximityVelocity; // taken, and not acted on + } else if (Point.evEvent->is_command()) { // jeśli prędkość jest zerowa, a komórka zawiera komendę