forked from mirror/OpenTTD
(svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-Codechange: renamed all 'schedule' stuff to 'order(list)' -Codechange: moved all order-stuff to order_cmd.c / order.h -Codechange: vehicles that share orders are now linked to eachother with next_shared/prev_shared in Vehicle Developers: please use AssignOrder to assign data to an order. If not, you _WILL_ make the save-routine to assert!
This commit is contained in:
@@ -90,14 +90,16 @@ void BuildVehicleList(vehiclelist_d *vl, int type, int owner, int station)
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == type && v->subtype <= subtype) {
|
||||
const Order *ord;
|
||||
for (ord = v->schedule_ptr; ord->type != OT_NOTHING; ++ord)
|
||||
if (ord->type == OT_GOTO_STATION && ord->station == station) {
|
||||
const Order *order;
|
||||
|
||||
FOR_VEHICLE_ORDERS(v, order) {
|
||||
if (order->type == OT_GOTO_STATION && order->station == station) {
|
||||
_vehicle_sort[n].index = v->index;
|
||||
_vehicle_sort[n].owner = v->owner;
|
||||
++n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user