1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 13:09:15 +00:00

(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner

This commit is contained in:
tron
2005-06-04 11:56:32 +00:00
parent 19e2b40a78
commit 0c4ecbe9ec
25 changed files with 118 additions and 122 deletions

View File

@@ -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() ||