mirror of https://github.com/OpenTTD/OpenTTD
(svn r1697) Remove superflous special case for the VOID border tiles in FindLandscapeHeightByTile()
While here clean up some other stuff: uint -> TileIndex, assert() that the TileIndex is valid and remove a line which was already commented outrelease/0.4.5
parent
63653bd6af
commit
eebb2f196d
12
landscape.c
12
landscape.c
|
@ -80,22 +80,14 @@ int GetTileZ(uint tile)
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindLandscapeHeightByTile(TileInfo *ti, uint tile)
|
void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile)
|
||||||
{
|
{
|
||||||
if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) {
|
assert(tile < MapSize());
|
||||||
ti->tileh = 0;
|
|
||||||
ti->type = MP_VOID;
|
|
||||||
ti->tile = 0;
|
|
||||||
ti->map5 = 0;
|
|
||||||
ti->z = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ti->tile = tile;
|
ti->tile = tile;
|
||||||
ti->map5 = _map5[tile];
|
ti->map5 = _map5[tile];
|
||||||
ti->type = TileType(tile);
|
ti->type = TileType(tile);
|
||||||
ti->tileh = GetTileSlope(tile, &ti->z);
|
ti->tileh = GetTileSlope(tile, &ti->z);
|
||||||
// ti->z = min * 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find the landscape height for the coordinates x y */
|
/* find the landscape height for the coordinates x y */
|
||||||
|
|
Loading…
Reference in New Issue