diff options
author | truelight <truelight@openttd.org> | 2004-08-31 16:12:52 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-08-31 16:12:52 +0000 |
commit | 5eba928cb8afb98d25d8145b8f026e0de199d875 (patch) | |
tree | b97b894f85152a05546c2ecb614f2488d094de11 /ai_build.c | |
parent | a7dd461672f1802054c1e879dc1250bfcaac464f (diff) | |
download | openttd-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.c | 2 |
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; |