From 971201b3b7877028140863304a0e8dd63f7e4df8 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Fri, 13 Mar 2020 11:47:54 +0000 Subject: Fix: [AI/GS] CanBuildConnectedRoadPartsHere neighbours tiles were at times incorrect --- src/script/api/script_road.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script') diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp index f84258178..e1549b0d7 100644 --- a/src/script/api/script_road.cpp +++ b/src/script/api/script_road.cpp @@ -401,7 +401,7 @@ static bool NormaliseTileOffset(int32 *tile) if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1; /* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */ - static const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)}; + const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)}; Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32)); existing->size = 0; -- cgit v1.2.3-70-g09d2