src/tunnel_map.cpp
branchnoai
changeset 9694 e72987579514
parent 9629 66dde6412125
child 8579 3efbb430092e
child 9723 eee46cb39750
equal deleted inserted replaced
9693:31fcaa5375a1 9694:e72987579514
    62  * @return true if and only if there is a tunnel.
    62  * @return true if and only if there is a tunnel.
    63  */
    63  */
    64 bool IsTunnelInWay(TileIndex tile, uint z)
    64 bool IsTunnelInWay(TileIndex tile, uint z)
    65 {
    65 {
    66 	return
    66 	return
    67 		IsTunnelInWayDir(tile, z, DIAGDIR_NE) ||
    67 		IsTunnelInWayDir(tile, z, (TileX(tile) > (MapMaxX() / 2)) ? DIAGDIR_NE : DIAGDIR_SW) ||
    68 		IsTunnelInWayDir(tile, z, DIAGDIR_SE) ||
    68 		IsTunnelInWayDir(tile, z, (TileY(tile) > (MapMaxY() / 2)) ? DIAGDIR_NW : DIAGDIR_SE);
    69 		IsTunnelInWayDir(tile, z, DIAGDIR_SW) ||
       
    70 		IsTunnelInWayDir(tile, z, DIAGDIR_NW);
       
    71 }
    69 }