MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getZOrder

Method getZOrder

game/state/tilemap/tileobject_doodad.cpp:63–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63float TileObjectDoodad::getZOrder() const
64{
65 // FIXME: Hack to force 'overlay' objects to be half-a-tile up in Z
66 // The formula to calculate "3.5f" is: (tile_x + tile_y + tile_z) / tile_z /2
67 return getCenter().z + 3.5f + (float)getType() / 1000.0f;
68}
69
70bool TileObjectDoodad::hasVoxelMap(bool los [[maybe_unused]]) const
71{

Callers 1

operator()Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected