benilla-re systems structs docs

s_cellFacetTriangles

global · terrain

Address
0x810438 · 48 bytes, up to 0x810467
Type
uint32_t[12]
Meaning
Holds a cell's four facet triangles: (17, 9, 0), (9, 1, 0), (9, 17, 18), (9, 18, 1)
Confidence
verified, proof one
Finding
terrain/collide#chunk-facets

Finding: Chunk facets in terrain: collide

0x6aadc0 gathers a chunk's facets: four triangles per cell of the rectangle clamped to the chunk, skipping holes, from its inner vertex C and corners V, V+1, V+17 and V+18 as (V+17, C, V), (C, V+1, V), (C, V+17, V+18) and (C, V+18, V+1). A triangle is kept unless one face of the box, grown by 0.019444443 and taken relative to the chunk, has all three vertices outside. The vertices are stored as chunk vertex plus position. It also adds an impassable chunk's walls, the liquid slots' facets and the doodads' and entities' by the mask.

The derivation is in the doc.