diff options
author | KUDr <kudr@openttd.org> | 2006-11-05 18:42:25 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2006-11-05 18:42:25 +0000 |
commit | fd361b104de0aca6ce3f5f41856502f306f28b14 (patch) | |
tree | 25b31ec9a0c72f4795c36973f401434d8b4fc44b /pathfind.c | |
parent | a763e7e52ede53d617dac0a84421629d96eec0e5 (diff) | |
download | openttd-fd361b104de0aca6ce3f5f41856502f306f28b14.tar.xz |
(svn r7069) -Fix: AI tried to build road from the back or side of road stop/depot (peter1138)
Diffstat (limited to 'pathfind.c')
-rw-r--r-- | pathfind.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pathfind.c b/pathfind.c index 9b8cfc3ec..1e724c632 100644 --- a/pathfind.c +++ b/pathfind.c @@ -294,9 +294,9 @@ static void TPFMode1(TrackPathFinder* tpf, TileIndex tile, DiagDirection directi if (tpf->tracktype == TRANSPORT_ROAD) { // road stops and depots now have a track (r4419) // don't enter road stop from the back - if (IsRoadStopTile(tile) && GetRoadStopDir(tile) == direction) return; + if (IsRoadStopTile(tile) && ReverseDiagDir(GetRoadStopDir(tile)) != direction) return; // don't enter road depot from the back - if (IsTileDepotType(tile, TRANSPORT_ROAD) && GetRoadDepotDirection(tile) == direction) return; + if (IsTileDepotType(tile, TRANSPORT_ROAD) && ReverseDiagDir(GetRoadDepotDirection(tile)) != direction) return; } tpf->rd.cur_length++; |