summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-09-03 08:25:27 +0000
committertron <tron@openttd.org>2006-09-03 08:25:27 +0000
commitd5e5a78cf414eb143741f6fc15d8245f5197b3c9 (patch)
tree79ebec494a87cd0b8e16e577740868f5bf90a7d2 /ai/default
parent5a86b502c2f553096f88d7f84241e0f3e581fcb2 (diff)
downloadopenttd-d5e5a78cf414eb143741f6fc15d8245f5197b3c9.tar.xz
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index ef794a9ca..e2971a432 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -2453,7 +2453,7 @@ handle_nocash:
order.type = OT_GOTO_STATION;
order.flags = 0;
- order.dest.station = AiGetStationIdByDef(aib->use_tile, aib->cur_building_rule);
+ order.dest = AiGetStationIdByDef(aib->use_tile, aib->cur_building_rule);
if (!is_pass && i == 1) order.flags |= OF_UNLOAD;
if (p->ai.num_want_fullload != 0 && (is_pass || i == 0))
@@ -3185,7 +3185,7 @@ static void AiStateBuildRoadVehicles(Player *p)
order.type = OT_GOTO_STATION;
order.flags = 0;
- order.dest.station = AiGetStationIdFromRoadBlock(aib->use_tile, aib->cur_building_rule);
+ order.dest = AiGetStationIdFromRoadBlock(aib->use_tile, aib->cur_building_rule);
if (!is_pass && i == 1) order.flags |= OF_UNLOAD;
if (p->ai.num_want_fullload != 0 && (is_pass || i == 0))
@@ -3464,7 +3464,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
order.type = OT_GOTO_STATION;
order.flags = 0;
- order.dest.station = AiGetStationIdFromAircraftBlock(aib->use_tile, aib->cur_building_rule);
+ order.dest = AiGetStationIdFromAircraftBlock(aib->use_tile, aib->cur_building_rule);
if (!is_pass && i == 1) order.flags |= OF_UNLOAD;
if (p->ai.num_want_fullload != 0 && (is_pass || i == 0))
@@ -3567,7 +3567,7 @@ static void AiStateRemoveStation(Player *p)
in_use = malloc(GetStationArraySize());
memset(in_use, 0, GetStationArraySize());
FOR_ALL_ORDERS(ord) {
- if (ord->type == OT_GOTO_STATION) in_use[ord->dest.station] = 1;
+ if (ord->type == OT_GOTO_STATION) in_use[ord->dest] = 1;
}
// Go through all stations and delete those that aren't in use