* Get the height ('z') of a bridge. * @param t the bridge ramp tile to get the bridge height from * @return the height of the bridge. */
| 68 | * @return the height of the bridge. |
| 69 | */ |
| 70 | int GetBridgeHeight(TileIndex t) |
| 71 | { |
| 72 | auto [tileh, h] = GetTileSlopeZ(t); |
| 73 | Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetTunnelBridgeDirection(t))); |
| 74 | |
| 75 | /* one height level extra for the ramp */ |
| 76 | return h + 1 + ApplyFoundationToSlope(f, tileh); |
| 77 | } |
no test coverage detected