summaryrefslogtreecommitdiff
path: root/ai.c
diff options
context:
space:
mode:
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)) {