benilla-re systems structs docs

GetSurfaceHeight

function · terrain · orchestration

Address
0x6b7070 · 525 bytes, up to 0x6b727c
Signature
int32_t __fastcall (const float *point, float *out, float range)
Meaning
Writes the highest of terrain, liquid and a vertical object hit within range of a point
Confidence
inferred
Finding
terrain/queries#surface-height
Test
terrain::sphere_cell_indices_difftest, terrain::sphere_seg_prep_difftest, terrain::sphere_compose_z_difftest

Finding: Surface height in terrain: queries

0x6b7070(point, out, range) gives the highest surface within range of a point: the chunk's terrain height, raised to the liquid height when that is higher, then the hit of a vertical segment from z + range to z − range against map objects, doodads and models, keeping the higher of hit and terrain. It returns 0 when range is below 0.01, when no area covers the point, and when nothing is hit and the chunk gave no height, a hole with liquid included; with no chunk the terrain starts at −100000. Off the map the indices wrap. The weather is its one caller.

The derivation is in the doc.

Callers 1

Callees 6

Calls and jumps by a bare address, from tables/calls.tsv.