summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-06 11:39:00 +0000
committertron <tron@openttd.org>2005-01-06 11:39:00 +0000
commitf8c95a1dbeac23296cacc83ae25d2a8b352cd83d (patch)
treef875975dc056d7d3fea370018fa0bdf62837fd3e /aircraft_cmd.c
parent790b03c7071388addd4cb064e473e96f8e1f12e0 (diff)
downloadopenttd-f8c95a1dbeac23296cacc83ae25d2a8b352cd83d.tar.xz
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 23704b11f..082759ab5 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -215,12 +215,12 @@ int32 CmdBuildAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
Station *st;
const AirportFTAClass *Airport;
- const uint16 *cur_depot;
+ const TileIndexDiffC *cur_depot;
byte i = 0;
st = DEREF_STATION(_map2[tile]);
Airport = GetAirport(st->airport_type);
for (cur_depot = Airport->airport_depots; i != Airport->nof_depots; cur_depot++) {
- if ((uint)(st->airport_tile + *cur_depot) == tile) {
+ if ((uint)(st->airport_tile + ToTileIndexDiff(*cur_depot)) == tile) {
assert(Airport->layout[i].heading == HANGAR);
v->u.air.pos = Airport->layout[i].position;
break;