summaryrefslogtreecommitdiff
path: root/src/yapf
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/yapf
parent56e63a60447beeae0cc541191ea77f06e237b40a (diff)
downloadopenttd-5b47f81b0f6d46a876a24c0384791af123ac4ab7.tar.xz
(svn r12584) -Codechange: do not access the order type directly.
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/yapf_destrail.hpp2
-rw-r--r--src/yapf/yapf_road.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/yapf/yapf_destrail.hpp b/src/yapf/yapf_destrail.hpp
index 7f03f8cec..16a0ea38a 100644
--- a/src/yapf/yapf_destrail.hpp
+++ b/src/yapf/yapf_destrail.hpp
@@ -86,7 +86,7 @@ protected:
public:
void SetDestination(Vehicle* v)
{
- switch (v->current_order.type) {
+ switch (v->current_order.GetType()) {
case OT_GOTO_STATION:
m_destTile = CalcStationCenterTile(v->current_order.dest);
m_dest_station_id = v->current_order.dest;
diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp
index eef92e5f7..efa6bb70d 100644
--- a/src/yapf/yapf_road.cpp
+++ b/src/yapf/yapf_road.cpp
@@ -84,7 +84,7 @@ public:
const Vehicle* v = Yapf().GetVehicle();
// we have reached the vehicle's destination - segment should end here to avoid target skipping
- if (v->current_order.type == OT_GOTO_STATION && tile == v->dest_tile) break;
+ if (v->current_order.IsType(OT_GOTO_STATION) && tile == v->dest_tile) break;
// stop if we have just entered the depot
if (IsTileDepotType(tile, TRANSPORT_ROAD) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) {