CMapObjGroup::LiquidHeight
function · models · primitive
- Address
0x6b9f10· 590 bytes, up to0x6ba15d- Signature
uint8_t __thiscall (CMapObjGroup *this, const float *point, uint32_t *type, float *height, float *vector)- Meaning
- Answers a group's liquid at a point: its type and unbiased surface, or the group's own type everywhere
- Confidence
- verified, proof one
- Finding
- models/wmo#group-liquid-override
- Test
models::mliq_liquid_height_difftest
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.
Callers 4
- UpdateCameraEnvironment terrain
- GetEntityInteriorLight terrain
- CMapObj::GroupLiquidAt models
- SetDefWaterPlane terrain
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.