CMapChunk::Update
function · terrain · primitive
- Address
0x6afad0· 803 bytes, up to0x6afdf2- Signature
void __thiscall (CMapChunk *this)- Meaning
- Sets a chunk's view depth and level, ages it, releases idle buffers and queues its points
- Confidence
- verified, proof one
- Finding
- terrain/cull#chunk-level-and-idle-release
- Test
terrain::plane_signed_dist_difftest,terrain::plane_lod_gate_ah_difftest,terrain::timer_accumulate_difftest,terrain::center_accumulate_difftest,terrain::center_half_difftest
Finding: Chunk level and idle release in terrain: cull
Each frame, for every chunk of a loaded area, 0x6afad0 stores the view depth of the chunk's
sphere, (p.y·c.y + p.z·c.z) + p.x·c.x + p.w − r with p the camera's view plane, sets the chunk's
level to maxLOD (3), or to 2 when world flag 4 is set and the depth is above lodDist (77),
and advances its idle time by the frame time. After 5 seconds it releases the chunk's vertex and
index buffers; its detail doodads get 0x6b28e0 after 1 second when 0x6b2900 allows and are
freed after 5; and each liquid slot releases its buffers after 5 seconds of its own.
The derivation is in the doc.
Callers 1
- CMapArea::DropFarChunks terrain
Callees 10
- BucketByDepth terrain
- CMapChunk::BucketPoint terrain
- CChunkLiquid::BucketCentre terrain
- ReleaseLiquidBuffers terrain
- GetLiquidSlotBox terrain
- IsVector3AllGreaterOrEqual terrain
- ReleaseChunkBuffers terrain
- FreeDetailDoodadBatch terrain
- ReleaseDetailDoodadBatchBuffers terrain
- HasDetailDoodadBuffers terrain
Calls and jumps by a bare address, from tables/calls.tsv.