benilla-re systems structs docs

s_cellOutcodeVertices

global · terrain

Address
0x810468 · 20 bytes, up to 0x81047b
Type
uint32_t[5]
Meaning
Holds the five vertex offsets of a cell: 0, 9, 17, 1, 18
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.