summaryrefslogtreecommitdiff
path: root/src/npf.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
commit5b47f81b0f6d46a876a24c0384791af123ac4ab7 (patch)
tree0ddf9ce628e1f7f3677425777bfeb4f04b23d7a0 /src/npf.cpp
parent56e63a60447beeae0cc541191ea77f06e237b40a (diff)
downloadopenttd-5b47f81b0f6d46a876a24c0384791af123ac4ab7.tar.xz
(svn r12584) -Codechange: do not access the order type directly.
Diffstat (limited to 'src/npf.cpp')
-rw-r--r--src/npf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/npf.cpp b/src/npf.cpp
index 1432c9189..2bb1a5ba9 100644
--- a/src/npf.cpp
+++ b/src/npf.cpp
@@ -980,7 +980,7 @@ void NPFFillWithOrderData(NPFFindStationOrTileData* fstd, Vehicle* v)
* dest_tile, not just any stop of that station.
* So only for train orders to stations we fill fstd->station_index, for all
* others only dest_coords */
- if (v->current_order.type == OT_GOTO_STATION && v->type == VEH_TRAIN) {
+ if (v->current_order.IsType(OT_GOTO_STATION) && v->type == VEH_TRAIN) {
fstd->station_index = v->current_order.dest;
/* Let's take the closest tile of the station as our target for trains */
fstd->dest_coords = CalcClosestStationTile(v->current_order.dest, v->tile);