MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getTerrainLevel

Method getTerrainLevel

src/Savegame/Tile.cpp:280–290  ·  view source on GitHub ↗

* If an object stand on this tile, this returns how high the unit is it standing. * @return the level in pixels */

Source from the content-addressed store, hash-verified

278 * @return the level in pixels
279 */
280int Tile::getTerrainLevel() const
281{
282 int level = 0;
283
284 if (_objects[MapData::O_FLOOR])
285 level = _objects[MapData::O_FLOOR]->getTerrainLevel();
286 if (_objects[MapData::O_OBJECT])
287 level += _objects[MapData::O_OBJECT]->getTerrainLevel();
288
289 return level;
290}
291
292/**
293 * Gets the tile's footstep sound.

Callers 2

hasNoFloorMethod · 0.45
getFootstepSoundMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected