mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r20732) -Fix: when trying to build a bridge over an object, try to autoremove the object if it's too high
This commit is contained in:
parent
0decc3e094
commit
2e054c19ad
|
@ -394,7 +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);
|
||||
if (GetTileMaxZ(tile) + spec->height * TILE_HEIGHT > z_start) goto not_valid_below;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue