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 | db8dfcd6e90f13ed0aafec06fc5975967afb1bb5 (patch) | |
tree | 7f558c2b1487df44a464aa980693e44cb438c592 /station_cmd.c | |
parent | f73a2829f364b07d6f944b8b49e156b9774db39b (diff) | |
download | openttd-db8dfcd6e90f13ed0aafec06fc5975967afb1bb5.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 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/station_cmd.c b/station_cmd.c index 49fd41017..6e7feda73 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1863,7 +1863,7 @@ static bool CheckShipsOnBuoy(Station *st) if (v->type == VEH_Ship) { const Order *order; FOR_VEHICLE_ORDERS(v, order) { - if (order->type == OT_GOTO_STATION && order->station == st->index) { + if (order->type == OT_GOTO_STATION && order->dest.station == st->index) { return true; } } @@ -2333,7 +2333,7 @@ static uint32 VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y) StationID station_id = GetStationIndex(tile); if ((!(v->current_order.flags & OF_NON_STOP) && !_patches.new_nonstop) || - (v->current_order.type == OT_GOTO_STATION && v->current_order.station == station_id)) { + (v->current_order.type == OT_GOTO_STATION && v->current_order.dest.station == station_id)) { if (!(_patches.new_nonstop && v->current_order.flags & OF_NON_STOP) && v->current_order.type != OT_LEAVESTATION && v->last_station_visited != station_id) { @@ -2412,7 +2412,7 @@ static void DeleteStation(Station *st) DeleteWindowById(WC_STATION_VIEW, index); /* Now delete all orders that go to the station */ - RemoveOrderFromAllVehicles(OT_GOTO_STATION, index); + RemoveOrderFromAllVehicles(OT_GOTO_STATION, (DestinationID)index); //And do the same with aircraft that have the station as a hangar-stop FOR_ALL_VEHICLES(v) { @@ -2420,7 +2420,7 @@ static void DeleteStation(Station *st) if (v->type == VEH_Aircraft) { Order *order; FOR_VEHICLE_ORDERS(v, order) { - if (order->type == OT_GOTO_DEPOT && order->station == index) { + if (order->type == OT_GOTO_DEPOT && order->dest.station == index) { order->type = OT_DUMMY; order->flags = 0; invalidate = true; |