From e8f4b7cf192a55cad0ed587411cea5e1efee22eb Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 30 Jan 2005 13:42:11 +0000 Subject: (svn r1728) - Fix: now a player can only build a road vehicle in depots he owns (hacked client protection) --- roadveh_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roadveh_cmd.c') 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); -- cgit v1.2.3-70-g09d2