forked from mirror/OpenTTD
(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
(i.e. spans two height levels) and use it throughout the code. -Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to build a depot on it. Wraps some bitmagic which seems quite unreadable at first glance
This commit is contained in:
@@ -1218,7 +1218,7 @@ static void PlaceProc_LightHouse(TileIndex tile)
|
||||
TileInfo ti;
|
||||
|
||||
FindLandscapeHeightByTile(&ti, tile);
|
||||
if (ti.type != MP_CLEAR || (ti.tileh & 0x10))
|
||||
if (IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh))
|
||||
return;
|
||||
|
||||
ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 1);
|
||||
@@ -1230,7 +1230,7 @@ static void PlaceProc_Transmitter(TileIndex tile)
|
||||
TileInfo ti;
|
||||
|
||||
FindLandscapeHeightByTile(&ti, tile);
|
||||
if (ti.type != MP_CLEAR || (ti.tileh & 0x10))
|
||||
if (IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh))
|
||||
return;
|
||||
|
||||
ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 0);
|
||||
|
Reference in New Issue
Block a user