PushFacet
function · terrain · host
- Address
0x6aca50· 219 bytes, up to0x6acb2a- Signature
void * __thiscall (void *this)- Meaning
- Appends a facet record to a list and returns it
- Confidence
- verified, proof one
- Finding
- terrain/collide#impassable-walls
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.
| side | test (strict) | start p | edge e | normal |
|---|---|---|---|---|
| y-min | Q.min1 < C.min1 | (C.min0, C.min1, C.minZ) | (+W, 0, 0) | (0, −1, 0) |
| y-max | Q.max1 > C.max1 | (C.max0, C.max1, C.minZ) | (−W, 0, 0) | (0, 1, 0) |
| x-min | Q.min0 < C.min0 | (C.min0, C.max1, C.minZ) | (0, −D, 0) | (−1, 0, 0) |
| x-max | Q.max0 > C.max0 | (C.max0, C.min1, C.minZ) | (0, +D, 0) | (1, 0, 0) |
The derivation is in the doc.
Callers 1
- CMapChunk::AddImpassableWalls terrain
Callees 2
- 0x5138b0 unassigned
- FillPlaneRecordWithScalar cmath
Calls and jumps by a bare address, from tables/calls.tsv.