benilla-re systems structs docs

s_groupLiquidTileArms

global · models

Address
0x6ba160 · 12 bytes, up to 0x6ba16b
Type
uint32_t[3]
Meaning
Holds the three arms of a group liquid tile accept: water, magma or slime, and a miss
Confidence
verified, proof one
Finding
models/wmo#group-liquid-override

Finding: Group liquid override in models: map objects

0x6b9f10(point, type, height, vector) answers a group's liquid at a point in the group's space. A group whose +0x38 (the MOGP header's liquid word, +0x34) is not 0xf is liquid at every point: the type is that word, the height FLT_MAX (0x7f7fffff), the vector zero, and the result 1. Without flag 0x1000 the result is 0 and nothing is written. Otherwise the tile under the point has a nibble: 0xf is a hole; the type written is nibble & 3; a tile of type 0 accepts when z < h + 0.01, type 1 never, type 2 and 3 when z < h, with h the interpolated surface, written unbiased.

The derivation is in the doc.