Add setting to allow placing all NewGRF objects under bridges
This commit is contained in:
@@ -493,6 +493,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
||||
break;
|
||||
|
||||
case MP_OBJECT: {
|
||||
if (_settings_game.construction.allow_grf_objects_under_bridges && GetObjectType(tile) >= NEW_OBJECT_OFFSET) break;
|
||||
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
|
||||
if ((spec->flags & OBJECT_FLAG_ALLOW_UNDER_BRIDGE) == 0) goto not_valid_below;
|
||||
if (GetTileMaxZ(tile) + spec->height > z_start) goto not_valid_below;
|
||||
|
Reference in New Issue
Block a user