benilla-re systems structs docs

GetLiquidStatus

function · terrain · primitive

Address
0x69b6d0 · 1012 bytes, up to 0x69bac3
Signature
uint8_t __fastcall (const float *point, uint32_t *type, float *height, float *flow, uint32_t *flag)
Meaning
Reports the liquid a point is in: its type, height, flow and tile flag
Confidence
verified, proof one
Finding
terrain/queries#liquid-status
Test
terrain::liquid_status_world, terrain::liquid_status_sound_zone

Finding: Liquid status in terrain: queries

0x69b6d0(point, type, height, flow, flag) reports the liquid at a point: a map object's liquid first, then the chunk's slots. For each slot it writes bit 7 of the tile byte to the flag and, for a tile with a type, accepts when the point is below the surface: an ocean tile when the point's z is below 0.01, with height 0 and no flow, and another tile when the bilinear height plus 0.01 is above z, after computing the flow when the height is above z. It writes type & 3 and returns 1, or returns 0.

The derivation is in the doc.

Callers 3

Callees 7

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