summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-05 23:36:54 +0000
committerrubidium <rubidium@openttd.org>2008-04-05 23:36:54 +0000
commit3b0e3d8d3033265f6225d86df7be3189782868f6 (patch)
tree0ddf9ce628e1f7f3677425777bfeb4f04b23d7a0 /src/openttd.cpp
parent4ff5d2057c5dabb0993325dfc0fba35acebd7291 (diff)
downloadopenttd-3b0e3d8d3033265f6225d86df7be3189782868f6.tar.xz
(svn r12584) -Codechange: do not access the order type directly.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 1bc6ccad0..74e623a44 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2178,7 +2178,7 @@ bool AfterLoadGame()
FOR_ALL_VEHICLES(v) {
if ((v->type != VEH_TRAIN || IsFrontEngine(v)) && // for all locs
!(v->vehstatus & (VS_STOPPED | VS_CRASHED)) && // not stopped or crashed
- v->current_order.type == OT_LOADING) { // loading
+ v->current_order.IsType(OT_LOADING)) { // loading
GetStation(v->last_station_visited)->loading_vehicles.push_back(v);
/* The loading finished flag is *only* set when actually completely
@@ -2195,7 +2195,7 @@ bool AfterLoadGame()
for (iter = st->loading_vehicles.begin(); iter != st->loading_vehicles.end();) {
Vehicle *v = *iter;
iter++;
- if (v->current_order.type != OT_LOADING) st->loading_vehicles.remove(v);
+ if (!v->current_order.IsType(OT_LOADING)) st->loading_vehicles.remove(v);
}
}
}
@@ -2307,7 +2307,7 @@ bool AfterLoadGame()
/* Update go to buoy orders because they are just waypoints */
Order *order;
FOR_ALL_ORDERS(order) {
- if (order->type == OT_GOTO_STATION && GetStation(order->dest)->IsBuoy()) {
+ if (order->IsType(OT_GOTO_STATION) && GetStation(order->dest)->IsBuoy()) {
order->flags = 0;
}
}