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

Method GetCornerHeight

src/script/api/script_tile.cpp:205–211  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

203}
204
205/* static */ SQInteger ScriptTile::GetCornerHeight(TileIndex tile, Corner corner)
206{
207 if (!::IsValidTile(tile) || !::IsValidCorner((::Corner)corner)) return -1;
208
209 auto [slope, z] = ::GetTileSlopeZ(tile);
210 return (z + ::GetSlopeZInCorner(slope, (::Corner)corner));
211}
212
213/* static */ ScriptCompany::CompanyID ScriptTile::GetOwner(TileIndex tile)
214{

Callers

nothing calls this directly

Calls 4

IsValidTileFunction · 0.85
IsValidCornerFunction · 0.85
GetTileSlopeZFunction · 0.85
GetSlopeZInCornerFunction · 0.85

Tested by

no test coverage detected