benilla-re systems structs docs

CMapChunk::AddImpassableWalls

function · terrain · primitive

Address
0x6ab530 · 1265 bytes, up to 0x6aba20
Signature
void __fastcall (CMapChunk *chunk, const float *box, void *list, uint32_t unused)
Meaning
Adds a 32000-yard wall of two facets for each chunk side the query box crosses
Confidence
verified, proof one
Finding
terrain/collide#impassable-walls
Test
terrain::impassable_chunk_fence_difftest

Finding: Impassable walls in terrain: collide

A chunk whose header flag bit 1 is set (0x40 in the runtime word +0xc, written once at 0x6af677) fences itself. For each side the query box crosses, 0x6ab530 adds a vertical quad of two facets along the chunk's own box. Min and max are chunk +0x44 to +0x4c and +0x50 to +0x58 (x, y, z); the quad rises 32000.0 from the chunk's lowest height C.minZ. The walls ignore the query's class mask, the flag is read once per chunk, and the chunk's own triangles are gathered as for any chunk.

sidetest (strict)start pedge enormal
y-minQ.min1 < C.min1(C.min0, C.min1, C.minZ)(+W, 0, 0)(0, −1, 0)
y-maxQ.max1 > C.max1(C.max0, C.max1, C.minZ)(−W, 0, 0)(0, 1, 0)
x-minQ.min0 < C.min0(C.min0, C.max1, C.minZ)(0, −D, 0)(−1, 0, 0)
x-maxQ.max0 > C.max0(C.max0, C.min1, C.minZ)(0, +D, 0)(1, 0, 0)

The derivation is in the doc.

Callers 1

Callees 7

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