MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsTunnelInWay

Function IsTunnelInWay

src/tunnel_map.cpp:68–72  ·  view source on GitHub ↗

* Is there a tunnel in the way in any direction? * @param tile the tile to search from. * @param z the 'z' to search on. * @return true if and only if there is a tunnel. */

Source from the content-addressed store, hash-verified

66 * @return true if and only if there is a tunnel.
67 */
68bool IsTunnelInWay(TileIndex tile, int z)
69{
70 return IsTunnelInWayDir(tile, z, (TileX(tile) > (Map::MaxX() / 2)) ? DIAGDIR_NE : DIAGDIR_SW) ||
71 IsTunnelInWayDir(tile, z, (TileY(tile) > (Map::MaxY() / 2)) ? DIAGDIR_NW : DIAGDIR_SE);
72}

Callers 1

CmdTerraformLandFunction · 0.85

Calls 3

IsTunnelInWayDirFunction · 0.85
TileXFunction · 0.85
TileYFunction · 0.85

Tested by

no test coverage detected