benilla-re systems structs docs

CMapObjDef::TraceGroupFace

function · terrain · primitive

Address
0x6a2600 · 190 bytes, up to 0x6a26bd
Signature
uint8_t __thiscall (CMapObjDef *this, const NTempest::C3Vector *start, const NTempest::C3Vector *end, uint32_t group, uint16_t *face, float *hit, float *t)
Meaning
Traces a segment against one group's render faces and returns the first face word and the hit point
Confidence
verified, proof one
Finding
terrain/mapentities#face-masks
Test
terrain::segpt_interp_difftest

Finding: Face masks in terrain: map entities

A face is a candidate for a trace when its flag byte has none of the mask bits set. The nearest-object probe 0x6a8840 passes mask 4 to 0x6b92b0, which ORs in 0x80 and so rejects faces with 0x84. The material trace 0x6a2600 passes 0x20 to 0x6a3a40, which builds mask 0x88. The bit 0x80 is a visited mark the leaf writes into the loaded face bytes and the query clears when it ends.

The derivation is in the doc.

Callers 1

Callees 2

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