src/npf.cpp
changeset 8836 f6f1ea3d7e93
parent 8785 871586967963
child 8840 332412c2e9c1
--- a/src/npf.cpp	Sat Apr 05 21:45:05 2008 +0000
+++ b/src/npf.cpp	Sat Apr 05 23:36:54 2008 +0000
@@ -980,7 +980,7 @@
 	 * dest_tile, not just any stop of that station.
 	 * So only for train orders to stations we fill fstd->station_index, for all
 	 * others only dest_coords */
-	if (v->current_order.type == OT_GOTO_STATION && v->type == VEH_TRAIN) {
+	if (v->current_order.IsType(OT_GOTO_STATION) && v->type == VEH_TRAIN) {
 		fstd->station_index = v->current_order.dest;
 		/* Let's take the closest tile of the station as our target for trains */
 		fstd->dest_coords = CalcClosestStationTile(v->current_order.dest, v->tile);