summaryrefslogtreecommitdiff
path: root/ai.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-29 19:41:44 +0000
committercelestar <celestar@openttd.org>2005-01-29 19:41:44 +0000
commit752b3f0dd614217d68f361e2d0b2cc599a37c860 (patch)
treefcefcecfa2ec7dd8e9178d5206788bd62dcf3c53 /ai.c
parent885fd2b15c1ae9a1422f82b8bcdd9d1a287c3aa6 (diff)
downloadopenttd-752b3f0dd614217d68f361e2d0b2cc599a37c860.tar.xz
(svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station. Thanks to: Truelight for the saveload code, Darkvater and Hackykid for network testing and Tron for proof-reading 1500 lines of diff.
Diffstat (limited to 'ai.c')
-rw-r--r--ai.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ai.c b/ai.c
index 11e7c0cb2..0014f075c 100644
--- a/ai.c
+++ b/ai.c
@@ -2567,10 +2567,10 @@ static int32 AiDoBuildDefaultRoadBlock(TileIndex tile, const AiDefaultBlockData
} else if (p->mode == 1) {
if (_want_road_truck_station) {
// Truck station
- r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_TRUCK_STATION);
+ r = DoCommandByTile(c, p->attr, RS_TRUCK, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
} else {
// Bus station
- r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_BUS_STATION);
+ r = DoCommandByTile(c, p->attr, RS_BUS, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
}
clear_town_stuff:;
@@ -3627,8 +3627,8 @@ static void AiStateRemoveStation(Player *p)
used=in_use;
FOR_ALL_STATIONS(st) {
if (st->xy != 0 && st->owner == _current_player && !*used &&
- ((tile = st->bus_tile) != 0 ||
- (tile = st->lorry_tile) != 0 ||
+ ( (st->bus_stops != NULL && (tile = st->bus_stops->xy) != 0) ||
+ (st->truck_stops != NULL && (tile = st->truck_stops->xy)) != 0 ||
(tile = st->train_tile) != 0 ||
(tile = st->dock_tile) != 0 ||
(tile = st->airport_tile) != 0)) {