diff options
author | terkhen <terkhen@openttd.org> | 2010-12-14 21:26:03 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-12-14 21:26:03 +0000 |
commit | 79e2b3153d4d89a653a72e07727e58300b435ac4 (patch) | |
tree | 62d1f676a9a63df00b92b64d8e866a98b080dc3b /src/pathfinder | |
parent | 96b98b392ad89e3d1718a7a46a3e41d4eeab61d3 (diff) | |
download | openttd-79e2b3153d4d89a653a72e07727e58300b435ac4.tar.xz |
(svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class.
Diffstat (limited to 'src/pathfinder')
-rw-r--r-- | src/pathfinder/npf/npf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 45c1c2d9c..e8e13f5fd 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -1101,7 +1101,7 @@ static void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, const Vehicle * * So only for train orders to stations we fill fstd->station_index, for all * others only dest_coords */ if (v->type != VEH_SHIP && (v->current_order.IsType(OT_GOTO_STATION) || v->current_order.IsType(OT_GOTO_WAYPOINT))) { - assert(v->type == VEH_TRAIN || v->type == VEH_ROAD); + assert(v->IsGroundVehicle()); fstd->station_index = v->current_order.GetDestination(); fstd->station_type = (v->type == VEH_TRAIN) ? (v->current_order.IsType(OT_GOTO_STATION) ? STATION_RAIL : STATION_WAYPOINT) : (RoadVehicle::From(v)->IsBus() ? STATION_BUS : STATION_TRUCK); fstd->not_articulated = v->type == VEH_ROAD && !RoadVehicle::From(v)->HasArticulatedPart(); |