From 55885206ccf4342b18b43ee831a22e6f380ae091 Mon Sep 17 00:00:00 2001 From: namdre Date: Tue, 5 Mar 2019 07:51:35 +0100 Subject: [PATCH] fix #5255 --- src/microsim/MSLaneChangerSublane.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/microsim/MSLaneChangerSublane.cpp b/src/microsim/MSLaneChangerSublane.cpp index 53174b8a236..a4ec8427e5a 100644 --- a/src/microsim/MSLaneChangerSublane.cpp +++ b/src/microsim/MSLaneChangerSublane.cpp @@ -120,10 +120,6 @@ assert(vehicle->getLane() == (*myCandi).lane); registerUnchanged(vehicle); return false; } - if (vehicle->isRemoteControlled()) { - registerUnchanged(vehicle); - return false; - } if (!vehicle->isActive()) { #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { @@ -268,6 +264,10 @@ MSLaneChangerSublane::continueChangeSublane(MSVehicle* vehicle, ChangerIt& from) bool MSLaneChangerSublane::startChangeSublane(MSVehicle* vehicle, ChangerIt& from, double latDist) { + if (vehicle->isRemoteControlled()) { + registerUnchanged(vehicle); + return false; + } // Prevent continuation of LC beyond lane borders if change is not allowed const double distToRightLaneBorder = latDist < 0 ? vehicle->getLane()->getWidth() * 0.5 + vehicle->getLateralPositionOnLane() - vehicle->getWidth() * 0.5 : 0.; const double distToLeftLaneBorder = latDist > 0 ? vehicle->getLane()->getWidth() * 0.5 - vehicle->getLateralPositionOnLane() - vehicle->getWidth() * 0.5 : 0.;