(svn r20668) -Codechange: add (more) support for bridges over objects

This commit is contained in:
rubidium
2010-08-28 19:02:21 +00:00
parent 738a068006
commit 34c4e8f259
3 changed files with 16 additions and 4 deletions

View File

@@ -394,6 +394,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
case MP_OBJECT: {
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
if ((spec->flags & OBJECT_FLAG_ALLOW_UNDER_BRIDGE) == 0) goto not_valid_below;
if (GetTileMaxZ(tile) + spec->height * TILE_HEIGHT > z_start) return_cmd_error(STR_ERROR_OBJECT_IN_THE_WAY);
break;
}