benilla-re systems structs docs

LinkEntityToMapObject

function · terrain · primitive

Address
0x6a8ed0 · 793 bytes, up to 0x6a91e8
Signature
void __fastcall (void *entity, void *a, void *b, uint32_t arg4, uint32_t arg5)
Meaning
Finds the map object group holding an entity and links the entity into its lists
Confidence
verified, proof one
Finding
terrain/lightattach#containment-walk
Test
terrain::floordrop_down_probe_difftest, terrain::floordrop_lerp_difftest, terrain::floordrop_offset_difftest

Finding: Containment walk in terrain: light node attach

0x6a8ed0 visits each loaded map object whose root box the node's box overlaps, and in it each group record, in the order the records were inserted, whose group box overlaps and which is loaded. The box query decides first; if it misses, the segment query. A group that passes is linked to the node. A group flagged 0x8 publishes nothing; for the others the face ray runs down the segment and, on a miss, up from the same start to 1000 above it. The last record to hit publishes, which is the nearest hit, and a tie goes to the later record.

The derivation is in the doc.

Callers 1

Callees 11

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