Mercurial > hg > openttd
diff src/station_cmd.cpp @ 6761:f75a2f332873 draft
(svn r9996) -Fix: be more strict when building/upgrading roads and/or road stops.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 31 May 2007 07:34:40 +0000 |
parents | 84f67d7e1b86 |
children | afa9c0a81fda |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1273,6 +1273,9 @@ 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;