17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-24 23:47:37 +02:00

fix(ai): a road order holding the vehicle keeps the road orders past it from telling the vehicle to drive on

This commit is contained in:
2026-10-22 18:01:04 +02:00
parent f4f8c75e49
commit 8fbf056749

View File

@@ -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ę