From a4750af65673e893f780c74c1316dd0bbb9992ed Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 31 May 2007 07:34:40 +0000 Subject: (svn r9996) -Fix: be more strict when building/upgrading roads and/or road stops. --- src/station_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index b863481b8..abee202b0 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1273,6 +1273,9 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (IsTileOwner(tile, OWNER_TOWN) && !_patches.road_stop_on_town_road) return_cmd_error(STR_DRIVE_THROUGH_ERROR_ON_TOWN_ROAD); if (GetRoadTileType(tile) != ROAD_TILE_NORMAL) return CMD_ERROR; + /* Don't allow building the roadstop when vehicles are already driving on it */ + if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR; + RoadTypes cur_rts = GetRoadTypes(tile); if (GetRoadOwner(tile, ROADTYPE_ROAD) != OWNER_TOWN && HASBIT(cur_rts, ROADTYPE_ROAD) && !CheckOwnership(GetRoadOwner(tile, ROADTYPE_ROAD))) return CMD_ERROR; if (HASBIT(cur_rts, ROADTYPE_TRAM) && !CheckOwnership(GetRoadOwner(tile, ROADTYPE_TRAM))) return CMD_ERROR; -- cgit v1.2.3-54-g00ecf