(svn r146) -Fix [AI]: Tunnel/bridge bug

-Fix [AI]: Minor problems
-Add [AI]: Profit check (if not making enough money, vehicles are sold)
This commit is contained in:
truelight
2004-08-31 16:12:52 +00:00
parent a7dd461672
commit 5eba928cb8
6 changed files with 250 additions and 103 deletions

View File

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