summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.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/newgrf_engine.cpp
parent56e63a60447beeae0cc541191ea77f06e237b40a (diff)
downloadopenttd-5b47f81b0f6d46a876a24c0384791af123ac4ab7.tar.xz
(svn r12584) -Codechange: do not access the order type directly.
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r--src/newgrf_engine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index efb380f49..b438d838d 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -348,11 +348,11 @@ static byte MapAircraftMovementAction(const Vehicle *v)
case TERM1:
case HELIPAD1:
- return (v->current_order.type == OT_LOADING) ? AMA_TTDP_ON_PAD1 : AMA_TTDP_LANDING_TO_PAD1;
+ return (v->current_order.IsType(OT_LOADING)) ? AMA_TTDP_ON_PAD1 : AMA_TTDP_LANDING_TO_PAD1;
case TERM2:
case HELIPAD2:
- return (v->current_order.type == OT_LOADING) ? AMA_TTDP_ON_PAD2 : AMA_TTDP_LANDING_TO_PAD2;
+ return (v->current_order.IsType(OT_LOADING)) ? AMA_TTDP_ON_PAD2 : AMA_TTDP_LANDING_TO_PAD2;
case TERM3:
case TERM4:
@@ -362,7 +362,7 @@ static byte MapAircraftMovementAction(const Vehicle *v)
case TERM8:
case HELIPAD3:
case HELIPAD4:
- return (v->current_order.type == OT_LOADING) ? AMA_TTDP_ON_PAD3 : AMA_TTDP_LANDING_TO_PAD3;
+ return (v->current_order.IsType(OT_LOADING)) ? AMA_TTDP_ON_PAD3 : AMA_TTDP_LANDING_TO_PAD3;
case TAKEOFF: // Moving to takeoff position
case STARTTAKEOFF: // Accelerating down runway
@@ -379,7 +379,7 @@ static byte MapAircraftMovementAction(const Vehicle *v)
case HELILANDING:
case HELIENDLANDING:
/* @todo Need to check terminal we're landing to. Is it known yet? */
- return (v->current_order.type == OT_GOTO_DEPOT) ?
+ return (v->current_order.IsType(OT_GOTO_DEPOT)) ?
AMA_TTDP_LANDING_TO_HANGAR : AMA_TTDP_LANDING_TO_PAD1;
default:
@@ -811,7 +811,7 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
return NULL;
}
- bool in_motion = v->First()->current_order.type != OT_LOADING;
+ bool in_motion = !v->First()->current_order.IsType(OT_LOADING);
totalsets = in_motion ? group->g.real.num_loaded : group->g.real.num_loading;