station_cmd.c
changeset 4527 b18634a31a4a
parent 4467 dede0d254ffb
child 4528 80cc2712b176
--- a/station_cmd.c	Sat Sep 02 22:47:45 2006 +0000
+++ b/station_cmd.c	Sun Sep 03 08:25:27 2006 +0000
@@ -1848,7 +1848,7 @@
 		if (v->type == VEH_Ship) {
 			const Order *order;
 			FOR_VEHICLE_ORDERS(v, order) {
-				if (order->type == OT_GOTO_STATION && order->dest.station == st->index) {
+				if (order->type == OT_GOTO_STATION && order->dest == st->index) {
 					return true;
 				}
 			}
@@ -2289,7 +2289,7 @@
 			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.dest.station == station_id)) {
+					(v->current_order.type == OT_GOTO_STATION && v->current_order.dest == 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) {
@@ -2375,7 +2375,6 @@
   */
 void DestroyStation(Station *st)
 {
-	DestinationID dest;
 	StationID index;
 	Vehicle *v;
 
@@ -2389,8 +2388,7 @@
 	DeleteWindowById(WC_STATION_VIEW, index);
 
 	/* Now delete all orders that go to the station */
-	dest.station = index;
-	RemoveOrderFromAllVehicles(OT_GOTO_STATION, dest);
+	RemoveOrderFromAllVehicles(OT_GOTO_STATION, index);
 
 	//And do the same with aircraft that have the station as a hangar-stop
 	FOR_ALL_VEHICLES(v) {
@@ -2398,7 +2396,7 @@
 		if (v->type == VEH_Aircraft) {
 			Order *order;
 			FOR_VEHICLE_ORDERS(v, order) {
-				if (order->type == OT_GOTO_DEPOT && order->dest.station == index) {
+				if (order->type == OT_GOTO_DEPOT && order->dest == index) {
 					order->type = OT_DUMMY;
 					order->flags = 0;
 					invalidate = true;