diff options
author | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
commit | a9b95b3cbb397e5a644c8310d33d046b2737ce16 (patch) | |
tree | 172ef15bca6626b797fbf586a043a978ee884141 /ship_cmd.c | |
parent | 6b3d3a0f8a89c3d9b2afef555277b9009fdb544e (diff) | |
download | openttd-a9b95b3cbb397e5a644c8310d33d046b2737ce16.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 'ship_cmd.c')
-rw-r--r-- | ship_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ship_cmd.c b/ship_cmd.c index 1db631b1e..62ec43c38 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -876,7 +876,7 @@ int32 CmdBuildShip(int x, int y, uint32 flags, uint32 p1, uint32 p2) /* The ai_new queries the vehicle cost before building the route, * so we must check against cheaters no sooner than now. --pasky */ if (!IsTileDepotType(tile, TRANSPORT_WATER)) return CMD_ERROR; - if (_map_owner[tile] != _current_player) return CMD_ERROR; + if (!IsTileOwner(tile, _current_player)) return CMD_ERROR; v = AllocateVehicle(); if (v == NULL || IsOrderPoolFull() || |