Use cached road one way state for overtaking vehicles ahead check

This commit is contained in:
Jonathan G Rennison
2020-10-27 23:49:14 +00:00
parent 77c14c2f1e
commit 13070172ae

View File

@@ -997,7 +997,7 @@ static void RoadVehCheckOvertake(RoadVehicle *v, RoadVehicle *u)
if (entry->GetOccupied() < opposite_entry->GetOccupied()) return;
break;
}
if (check_tile != v->tile && IsNormalRoadTile(check_tile) && GetDisallowedRoadDirections(check_tile) != DRD_NONE) {
if (check_tile != v->tile && GetRoadCachedOneWayState(check_tile) != RCOWS_NORMAL) {
/* one-way road, don't worry about other vehicles */
continue;
}