CMapObjDef::TraceGroupFace
function · terrain · primitive
- Address
0x6a2600· 190 bytes, up to0x6a26bd- 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
- AttachEntityToGround terrain
Callees 2
- CMapObj::TraceGroupMasked models
- TransformPoint cmath
Calls and jumps by a bare address, from tables/calls.tsv.