(svn r12584) -Codechange: do not access the order type directly.

This commit is contained in:
rubidium
2008-04-05 23:36:54 +00:00
parent 56e63a6044
commit 5b47f81b0f
22 changed files with 259 additions and 218 deletions

View File

@@ -84,7 +84,7 @@ public:
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)))) {