benilla-re systems structs docs

SetDefWaterPlane

function · terrain · primitive

Address
0x6a7650 · 389 bytes, up to 0x6a77d4
Signature
void __thiscall (void *this, uint32_t arg2)
Meaning
Finds the liquid at a def once and sets the record's water clip plane (0, 0, 1, -height)
Confidence
verified, proof one
Finding
terrain/lights#water-plane
Test
terrain::clip_plane_negate_difftest

Finding: Water plane in terrain: map lights

0x6a7650 is the def's water slot. Unless +0x90 bit 0x1000 is set it finds the liquid at the def, indoors the group's liquid height (0x6b9f10) moved to world space, outdoors the terrain liquid (0x69b6d0); a hit sets bit 0x20 (0x100 if fishable) and the height +0x98, and bit 0x1000 is set. A def with bit 0x20 sets the record's clip flag +0x19c to 1 and its plane +0x1a0 to (0, 0, 1, −height).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

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