summaryrefslogtreecommitdiff
path: root/ai_build.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-08-31 16:12:52 +0000
committertruelight <truelight@openttd.org>2004-08-31 16:12:52 +0000
commit5eba928cb8afb98d25d8145b8f026e0de199d875 (patch)
treeb97b894f85152a05546c2ecb614f2488d094de11 /ai_build.c
parenta7dd461672f1802054c1e879dc1250bfcaac464f (diff)
downloadopenttd-5eba928cb8afb98d25d8145b8f026e0de199d875.tar.xz
(svn r146) -Fix [AI]: Tunnel/bridge bug
-Fix [AI]: Minor problems -Add [AI]: Profit check (if not making enough money, vehicles are sold)
Diffstat (limited to 'ai_build.c')
-rw-r--r--ai_build.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ai_build.c b/ai_build.c
index 909c7e673..2614dc9d1 100644
--- a/ai_build.c
+++ b/ai_build.c
@@ -177,7 +177,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
// Build the tile
res = DoCommandByTile(route[part], dir, 0, flag | DC_NO_WATER, CMD_BUILD_ROAD);
// Currently, we ignore CMD_ERRORs!
- if (res == CMD_ERROR && !IS_TILETYPE(route[part], MP_STREET) && (flag == DC_EXEC && !EnsureNoVehicle(route[part]))) {
+ if (res == CMD_ERROR && flag == DC_EXEC && !IS_TILETYPE(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
// Problem.. let's just abort it all!
DEBUG(ai,0)("Darn, the route could not be builded.. aborting!");
p->ainew.state = AI_STATE_NOTHING;