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

Function TerraformGetHeightOfTile

src/terraform_cmd.cpp:45–49  ·  view source on GitHub ↗

* Gets the TileHeight (height of north corner) of a tile as of current terraforming progress. * * @param ts TerraformerState. * @param tile Tile. * @return TileHeight. */

Source from the content-addressed store, hash-verified

43 * @return TileHeight.
44 */
45static int TerraformGetHeightOfTile(const TerraformerState *ts, TileIndex tile)
46{
47 TileIndexToHeightMap::const_iterator it = ts->tile_to_new_height.find(tile);
48 return it != ts->tile_to_new_height.end() ? it->second : TileHeight(tile);
49}
50
51/**
52 * Stores the TileHeight (height of north corner) of a tile in a TerraformerState.

Callers 2

TerraformTileHeightFunction · 0.85
CmdTerraformLandFunction · 0.85

Calls 3

TileHeightFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected