summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-22 20:07:26 +0000
committerrubidium <rubidium@openttd.org>2009-05-22 20:07:26 +0000
commitc882248348510265e1926b0abc031b4c6fb0f97f (patch)
treee2e97af6a402e4babea7d19de728a50ead416f51 /src/newgrf_engine.cpp
parentada30679605644a228be26850a76370fea723799 (diff)
downloadopenttd-c882248348510265e1926b0abc031b4c6fb0f97f.tar.xz
(svn r16388) -Codechange: move u.air to Aircraft
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 a3bd84c2d..993ff00f9 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -180,9 +180,9 @@ static byte MapAircraftMovementState(const Aircraft *v)
if (st == NULL) return AMS_TTDP_FLIGHT_TO_TOWER;
const AirportFTAClass *afc = st->Airport();
- uint16 amdflag = afc->MovingData(v->u.air.pos)->flag;
+ uint16 amdflag = afc->MovingData(v->pos)->flag;
- switch (v->u.air.state) {
+ switch (v->state) {
case HANGAR:
/* The international airport is a special case as helicopters can land in
* front of the hanger. Helicopters also change their air.state to
@@ -303,7 +303,7 @@ enum {
*/
static byte MapAircraftMovementAction(const Aircraft *v)
{
- switch (v->u.air.state) {
+ switch (v->state) {
case HANGAR:
return (v->cur_speed > 0) ? AMA_TTDP_LANDING_TO_HANGAR : AMA_TTDP_IN_HANGAR;
@@ -796,7 +796,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
Aircraft *a = (Aircraft *)v;
switch (variable - 0x80) {
case 0x62: return MapAircraftMovementState(a); // Current movement state
- case 0x63: return v->u.air.targetairport; // Airport to which the action refers
+ case 0x63: return a->targetairport; // Airport to which the action refers
case 0x66: return MapAircraftMovementAction(a); // Current movement action
}
} break;
@@ -936,7 +936,7 @@ SpriteID GetRotorOverrideSprite(EngineID engine, const Aircraft *v, bool info_vi
if (v == NULL) return group->g.result.sprite;
- return group->g.result.sprite + (info_view ? 0 : (v->Next()->Next()->u.air.state % group->g.result.num_sprites));
+ return group->g.result.sprite + (info_view ? 0 : (v->Next()->Next()->state % group->g.result.num_sprites));
}