forked from mirror/OpenTTD
(svn r1730) - Fix: Ships and Aircrafts have to be build in depots owned by _current_player (hacked client protection)
now all 4 types of vehicles have to be build in depots. Note: there is a wordaround for AI players since the AI handle aircraft building in a weird way
This commit is contained in:
@@ -841,6 +841,10 @@ int32 CmdBuildShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
|
||||
if (!IsEngineBuildable(p1, VEH_Ship)) return CMD_ERROR;
|
||||
|
||||
if (!IsShipDepotTile((TileIndex)tile)) return CMD_ERROR;
|
||||
|
||||
if (_map_owner[tile] != _current_player) return CMD_ERROR;
|
||||
|
||||
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
|
||||
|
||||
value = EstimateShipCost(p1);
|
||||
|
Reference in New Issue
Block a user