(svn r14097) -Fix [FS#2085]: one couldn't get a list of vehicles sharing an order when the number of orders was 0; you could see that the vehicles had a shared order though.

This commit is contained in:
rubidium
2008-08-17 21:07:09 +00:00
parent 66b9ea9a5a
commit 141001d031
5 changed files with 17 additions and 37 deletions

View File

@@ -93,15 +93,9 @@ void GenerateVehicleSortList(VehicleList *list, VehicleType type, PlayerID owner
break;
case VLW_SHARED_ORDERS:
FOR_ALL_VEHICLES(v) {
/* Find a vehicle with the order in question */
if (v->orders != NULL && v->orders->index == index) {
/* Add all vehicles from this vehicle's shared order list */
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
*list->Append() = v;
}
break;
}
/* Add all vehicles from this vehicle's shared order list */
for (v = GetVehicle(index); v != NULL; v = v->NextShared()) {
*list->Append() = v;
}
break;