diff options
author | bjarni <bjarni@openttd.org> | 2005-01-30 13:42:11 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-01-30 13:42:11 +0000 |
commit | e8f4b7cf192a55cad0ed587411cea5e1efee22eb (patch) | |
tree | 348ca9e9ea285936ce9cd64a991a7486b766ca18 /roadveh_cmd.c | |
parent | 5987455d359375ab574dd0accc6a1871602c87ae (diff) | |
download | openttd-e8f4b7cf192a55cad0ed587411cea5e1efee22eb.tar.xz |
(svn r1728) - Fix: now a player can only build a road vehicle in depots he owns (hacked client protection)
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 445530008..64e92d28f 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -118,6 +118,10 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!IsEngineBuildable(p1, VEH_Road)) return CMD_ERROR; + if (!IsRoadDepotTile((TileIndex)tile)) return CMD_ERROR; + + if (_map_owner[tile] != _current_player) return CMD_ERROR; + SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); cost = EstimateRoadVehCost(p1); |