diff options
author | truelight <truelight@openttd.org> | 2006-08-26 16:34:03 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2006-08-26 16:34:03 +0000 |
commit | 65f5ec13f678b98686abc8e599fc87adc81c5d26 (patch) | |
tree | 7f558c2b1487df44a464aa980693e44cb438c592 /ai/default | |
parent | 4d43389c286f5ea2eccface64ef7b9afc5647ebc (diff) | |
download | openttd-65f5ec13f678b98686abc8e599fc87adc81c5d26.tar.xz |
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
-Codechange: introduced DestinationID, which is in fact an union of several types
Used in Order struct, so no longer StationID is abused for all targets.
Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
Diffstat (limited to 'ai/default')
-rw-r--r-- | ai/default/default.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index 08af2b119..623686fd7 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.station = AiGetStationIdByDef(aib->use_tile, aib->cur_building_rule); + order.dest.station = 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.station = AiGetStationIdFromRoadBlock(aib->use_tile, aib->cur_building_rule); + order.dest.station = 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.station = AiGetStationIdFromAircraftBlock(aib->use_tile, aib->cur_building_rule); + order.dest.station = 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->station] = 1; + if (ord->type == OT_GOTO_STATION) in_use[ord->dest.station] = 1; } // Go through all stations and delete those that aren't in use |