s_cameraLiquidCases
global · terrain
- Address
0x680ba4· 16 bytes, up to0x680bb3- Type
uint32_t[4]- Meaning
- Holds the case addresses of the liquid type switch, indexed by the type's low two bits
- Confidence
- verified, proof one
- Finding
- terrain/camstate#camera-environment
Finding: Camera environment in terrain: camera state
0x6809c0 samples the liquid at the camera's probe point: the camera's x and y, and the lowest z of the camera and
the four near corners of the frustum. Inside a map object group (0xc7b748) it asks the group's
liquid, with the point moved into the group's space; outdoors it asks the terrain query
0x6723d0. The depth 0xc7bc60 is the liquid height less the probe z, 0 when dry. The state
0xc7f288 becomes the liquid type, 0xf when dry. A change to type 0 or 1 scatters the drift
cloud and sets the size base 1/36, to type 2 scatters it and sets 1/9, to type 3 clears the
cloud's enable byte; leaving liquid forces a lighting rebuild.
The derivation is in the doc.