summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-04 11:56:32 +0000
committertron <tron@openttd.org>2005-06-04 11:56:32 +0000
commit0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (patch)
tree172ef15bca6626b797fbf586a043a978ee884141 /aircraft_cmd.c
parent19e2b40a788cc175f35e4ca0cec0f439bd46ab76 (diff)
downloadopenttd-0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c.tar.xz
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 1d4b29c1a..6ca106e3a 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -178,7 +178,7 @@ int32 CmdBuildAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
// Workaround: TODO: make AI players try to build planes in a hangar instead of just an airport tile.
if (!IsAircraftHangarTile(tile) && IS_HUMAN_PLAYER(_current_player)) return CMD_ERROR;
- if (_map_owner[tile] != _current_player && IS_HUMAN_PLAYER(_current_player)) return CMD_ERROR;
+ if (!IsTileOwner(tile, _current_player) && IS_HUMAN_PLAYER(_current_player)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);