Skip to content

Commit

Permalink
fix #5255
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 5, 2019
1 parent b57dfc9 commit 5588520
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/microsim/MSLaneChangerSublane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.;
Expand Down

0 comments on commit 5588520

Please sign in to comment.