CMapChunk::AddImpassableWalls
function · terrain · primitive
- Address
0x6ab530· 1265 bytes, up to0x6aba20- 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.
| 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
- GatherChunkFacets terrain
Callees 7
- DotVector3 objectlayer
- AddVector3 objectlayer
- ConstructFacet terrain
- GrowFacetArray terrain
- AddQuadFacets terrain
- PushFacet terrain
- SetPlaneFromNormal terrain
Calls and jumps by a bare address, from tables/calls.tsv.