(svn r7069) -Fix: AI tried to build road from the back or side of road stop/depot (peter1138)
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user