diff options
author | tron <tron@openttd.org> | 2004-12-18 12:19:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-18 12:19:04 +0000 |
commit | 376c5adb7ce86c3179dc38151c0ef15ef6f4f723 (patch) | |
tree | 6a21be6023198b75c0e6ac1463e0798005629948 /aircraft_cmd.c | |
parent | 64f98e058d8f54a23645614b09287f059893b9ab (diff) | |
download | openttd-376c5adb7ce86c3179dc38151c0ef15ef6f4f723.tar.xz |
(svn r1149) Fix hack which abuses first TileIndex of airport depot array as number of depots (similar change as in map branch)
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r-- | aircraft_cmd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 11cfec92b..d6af6737d 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -218,8 +218,7 @@ int32 CmdBuildAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2) byte i = 0; st = DEREF_STATION(_map2[tile]); Airport = GetAirport(st->airport_type); - // first element of depot array contains #of depots on the airport - for (cur_depot=&Airport->airport_depots[1]; i != Airport->airport_depots[0]; cur_depot++) { + for (cur_depot = Airport->airport_depots; i != Airport->nof_depots; cur_depot++) { if ((uint)(st->airport_tile + *cur_depot) == tile) { assert(Airport->layout[i].heading == HANGAR); v->u.air.pos = Airport->layout[i].position; |