changeset 17057:d1032dce7868 draft

(svn r21794) -Fix (r21790): convert train orders too (Rubidium)
author smatz <smatz@openttd.org>
date Fri, 14 Jan 2011 19:51:50 +0000
parents 8d85ca97b9b1
children 2bbacb524f85
files src/saveload/station_sl.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -42,14 +42,16 @@
 	/* Buoy orders become waypoint orders */
 	OrderList *ol;
 	FOR_ALL_ORDER_LISTS(ol) {
-		if (ol->GetFirstSharedVehicle()->type != VEH_SHIP) continue;
+		VehicleType vt = ol->GetFirstSharedVehicle()->type;
+		if (vt != VEH_SHIP && vt != VEH_TRAIN) continue;
 
 		for (Order *o = ol->GetFirstOrder(); o != NULL; o = o->next) UpdateWaypointOrder(o);
 	}
 
 	Vehicle *v;
 	FOR_ALL_VEHICLES(v) {
-		if (v->type != VEH_SHIP) continue;
+		VehicleType vt = v->type;
+		if (vt != VEH_SHIP && vt != VEH_TRAIN) continue;
 
 		UpdateWaypointOrder(&v->current_order);
 	}