diff options
author | yexo <yexo@openttd.org> | 2009-08-08 16:36:06 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-08-08 16:36:06 +0000 |
commit | eff8cb839072c3aa80d1e54b189810061160669a (patch) | |
tree | daf74355b9c9d4f73b998c4249b05423c3988f77 /src/ai/api/ai_vehiclelist.cpp | |
parent | 3dcc195dfa2c06212a44b186496bc558f519d154 (diff) | |
download | openttd-eff8cb839072c3aa80d1e54b189810061160669a.tar.xz |
(svn r17112) -Change [NoAI]: AIVehicleList_Station now also works for waypoints
Diffstat (limited to 'src/ai/api/ai_vehiclelist.cpp')
-rw-r--r-- | src/ai/api/ai_vehiclelist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_vehiclelist.cpp b/src/ai/api/ai_vehiclelist.cpp index 52ca83dae..011a48a7f 100644 --- a/src/ai/api/ai_vehiclelist.cpp +++ b/src/ai/api/ai_vehiclelist.cpp @@ -19,7 +19,7 @@ AIVehicleList::AIVehicleList() AIVehicleList_Station::AIVehicleList_Station(StationID station_id) { - if (!AIStation::IsValidStation(station_id)) return; + if (!AIBaseStation::IsValidBaseStation(station_id)) return; const Vehicle *v; FOR_ALL_VEHICLES(v) { @@ -27,7 +27,7 @@ AIVehicleList_Station::AIVehicleList_Station(StationID station_id) const Order *order; FOR_VEHICLE_ORDERS(v, order) { - if (order->IsType(OT_GOTO_STATION) && order->GetDestination() == station_id) { + if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT)) && order->GetDestination() == station_id) { this->AddItem(v->index); break; } |