diff options
author | bjarni <bjarni@openttd.org> | 2005-01-30 14:52:04 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-01-30 14:52:04 +0000 |
commit | 307c27892d91dfead68f7cb85ec4eefa89c5d10d (patch) | |
tree | 4623477c0a77662b7cbaa5ddf34e25846628e4c4 /ship_cmd.c | |
parent | 961ba55e85b44a8a099ca16cee8f1abf1487bc14 (diff) | |
download | openttd-307c27892d91dfead68f7cb85ec4eefa89c5d10d.tar.xz |
(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
Diffstat (limited to 'ship_cmd.c')
-rw-r--r-- | ship_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ship_cmd.c b/ship_cmd.c index c7330b9d2..c85377187 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -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); |