summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-05-10 09:21:22 +0000
committerpeter1138 <peter1138@openttd.org>2007-05-10 09:21:22 +0000
commit9643fd7638ee7d01c4182c1d4259d1e91b424ff8 (patch)
treef2d89eadc63cd3c877704846600b090a5220ffb1
parentdc2073b96e0fef24c4973b44b9a6c568e6d533d1 (diff)
downloadopenttd-9643fd7638ee7d01c4182c1d4259d1e91b424ff8.tar.xz
(svn r9819) -Codechange: Take account of AMED_HOLD in OTTD/TTDP state translation (bulb)
-rw-r--r--src/newgrf_engine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index f7b6fd112..f6ff61322 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -246,7 +246,7 @@ static byte MapAircraftMovementState(const Vehicle *v)
{
const Station *st = GetStation(v->u.air.targetairport);
const AirportFTAClass *afc = st->Airport();
- byte amdflag = afc->MovingData(v->u.air.pos)->flag;
+ uint16 amdflag = afc->MovingData(v->u.air.pos)->flag;
switch (v->u.air.state) {
case HANGAR:
@@ -313,7 +313,7 @@ static byte MapAircraftMovementState(const Vehicle *v)
}
case FLYING:
- return AMS_TTDP_FLIGHT_TO_TOWER;
+ return amdflag & AMED_HOLD ? AMS_TTDP_FLIGHT_APPROACH : AMS_TTDP_FLIGHT_TO_TOWER;
case LANDING: // Descent
return AMS_TTDP_FLIGHT_DESCENT;