src/tile.cpp
changeset 7820 f642e46e7f6b
parent 7819 694a7dacd30a
equal deleted inserted replaced
7819:694a7dacd30a 7820:f642e46e7f6b
    53 }
    53 }
    54 
    54 
    55 
    55 
    56 uint GetTileMaxZ(TileIndex t)
    56 uint GetTileMaxZ(TileIndex t)
    57 {
    57 {
    58 	if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) return 0;
    58 	if (TileX(t) == MapMaxX() || TileY(t) == MapMaxY()) return 0;
    59 
    59 
    60 	uint h = TileHeight(t);
    60 	uint h = TileHeight(t);
    61 	h = max(h, TileHeight(t + TileDiffXY(1, 0)));
    61 	h = max(h, TileHeight(t + TileDiffXY(1, 0)));
    62 	h = max(h, TileHeight(t + TileDiffXY(0, 1)));
    62 	h = max(h, TileHeight(t + TileDiffXY(0, 1)));
    63 	h = max(h, TileHeight(t + TileDiffXY(1, 1)));
    63 	h = max(h, TileHeight(t + TileDiffXY(1, 1)));