summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-01-15 19:06:22 +0000
committertruelight <truelight@openttd.org>2005-01-15 19:06:22 +0000
commit7cafdf3b0bc441586929be57ace0e9510f454381 (patch)
tree86e7a6e69dee1414ae1e88cfceffd93f1b28ded2 /vehicle_gui.c
parent0e651d9702ff028b75ad5834b614a25b4f119257 (diff)
downloadopenttd-7cafdf3b0bc441586929be57ace0e9510f454381.tar.xz
(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!
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 6166db2b9..601e7730c 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -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 {