summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-02 19:45:46 +0000
committerrubidium <rubidium@openttd.org>2009-01-02 19:45:46 +0000
commit7ab7c4e6ff0d20e01ef0f95cd9cbe88608199125 (patch)
tree0e4a2c5387cd6f2e22afa3dfa64b58cffe833cd8
parent9ee341b5a8417f92b7a2f8199a0cf2d72b0b92b0 (diff)
downloadopenttd-7ab7c4e6ff0d20e01ef0f95cd9cbe88608199125.tar.xz
(svn r14783) -Fix (r12661): don't add vehicles with "go to nearest depot" to the vehicle list of the depot with index 0.
-rw-r--r--src/vehiclelist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp
index 6579397a7..af3da1b12 100644
--- a/src/vehiclelist.cpp
+++ b/src/vehiclelist.cpp
@@ -116,7 +116,7 @@ void GenerateVehicleSortList(VehicleList *list, VehicleType type, Owner owner, u
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
- if (order->IsType(OT_GOTO_DEPOT) && order->GetDestination() == index) {
+ if (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && order->GetDestination() == index) {
*list->Append() = v;
break;
}