From 13070172ae03c69e05704d52cab89c8327be2e22 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 27 Oct 2020 23:49:14 +0000 Subject: [PATCH] Use cached road one way state for overtaking vehicles ahead check --- src/roadveh_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index ed1a702dab..61b40045fc 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -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; }