summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-08-20 09:32:32 +0000
committertruelight <truelight@openttd.org>2004-08-20 09:32:32 +0000
commit788ace088d8b3ba2afd77a8b21b532abc40d9eba (patch)
tree493248c0850e836b9a0d35c0fdddf9673b2a01b3 /station_cmd.c
parent80b1e25b6ce190a773ab9fe50927a983c8f2d038 (diff)
downloadopenttd-788ace088d8b3ba2afd77a8b21b532abc40d9eba.tar.xz
(svn r85) -Add: initial commit of new AI (enable in Patch menu)
-Add: generalised A* Algorithm -Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 6019957de..c5528d906 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -577,7 +577,7 @@ int32 CheckFlatLandBelow(uint tile, uint w, uint h, uint flags, uint invalid_dir
tileh = GetTileSlope(tile_cur, &z);
// steep slopes are completely prohibited
- if (tileh & 0x10 || ((_is_ai_player || !_patches.build_on_slopes) && tileh != 0)) {
+ if (tileh & 0x10 || (((!_patches.ainew_active && _is_ai_player) || !_patches.build_on_slopes) && tileh != 0)) {
_error_message = STR_0007_FLAT_LAND_REQUIRED;
return CMD_ERROR;
}
@@ -782,8 +782,8 @@ int32 CmdBuildRailroadStation(int x_org, int y_org, uint32 flags, uint32 p1, uin
return_cmd_error(STR_3009_TOO_CLOSE_TO_ANOTHER_STATION);
if (st->train_tile != 0) {
- // check if we want to expanding an already existing station? Only human players can do this.
- if (_is_ai_player || !_patches.join_stations || !CanExpandRailroadStation(st, finalvalues, direction))
+ // check if we want to expanding an already existing station?
+ if ((!_patches.ainew_active && _is_ai_player) || !_patches.join_stations || !CanExpandRailroadStation(st, finalvalues, direction))
return_cmd_error(STR_3005_TOO_CLOSE_TO_ANOTHER_RAILROAD);
}