1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r1954) Fix: The new AI now does not think it can connect to the road by building its piece of road above the end of a tunnel anymore.

This commit is contained in:
pasky
2005-03-07 11:36:05 +00:00
parent 6c60ff92ff
commit 771bd349cb

View File

@@ -214,7 +214,7 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr
if ((_map5[current->path.node.tile + TileOffsByDir(i)] & 1U) != (i & 1)) continue; if ((_map5[current->path.node.tile + TileOffsByDir(i)] & 1U) != (i & 1)) continue;
// This problem only is valid for tunnels: // This problem only is valid for tunnels:
// When the last tile was not yet a tunnel, check if we enter from the right side.. // When the last tile was not yet a tunnel, check if we enter from the right side..
if (!IsTileType(current->path.node.tile, MP_TUNNELBRIDGE) && (_map5[current->path.node.tile + TileOffsByDir(i)] & 0x80) == 0) { if ((_map5[current->path.node.tile + TileOffsByDir(i)] & 0x80) == 0) {
if (i != (_map5[current->path.node.tile + TileOffsByDir(i)] & 3U)) continue; if (i != (_map5[current->path.node.tile + TileOffsByDir(i)] & 3U)) continue;
} }
} }