MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / isUnderground

Function isUnderground

src/OpenLoco/src/Audio/VehicleAudio.cpp:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 static bool isUnderground(const World::Pos3& pos)
38 {
39 if (pos.x == Location::null || !World::validCoords(pos))
40 {
41 return false;
42 }
43 auto* surface = World::TileManager::get(pos).surface();
44 return surface->baseHeight() > pos.z;
45 }
46
47 static constexpr ReverbParams kTunnelReverb = {
48 .density = 1.0f,

Callers 2

updateSingleVehicleSoundFunction · 0.85

Calls 4

validCoordsFunction · 0.85
surfaceMethod · 0.80
baseHeightMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected