src/yapf/yapf_road.cpp
branchnoai
changeset 9869 6404afe43575
parent 9732 f8eb3e208514
child 10213 23cfd330ccac
child 10249 58810805030e
--- a/src/yapf/yapf_road.cpp	Sun Apr 06 14:12:19 2008 +0000
+++ b/src/yapf/yapf_road.cpp	Sun Apr 06 23:07:42 2008 +0000
@@ -84,7 +84,7 @@
 
 			const Vehicle* v = Yapf().GetVehicle();
 			// we have reached the vehicle's destination - segment should end here to avoid target skipping
-			if (v->current_order.type == OT_GOTO_STATION && tile == v->dest_tile) break;
+			if (v->current_order.IsType(OT_GOTO_STATION) && tile == v->dest_tile) break;
 
 			// stop if we have just entered the depot
 			if (IsTileDepotType(tile, TRANSPORT_ROAD) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) {