CMapDoodadDef::Repose
function · terrain · primitive
- Address
0x6a81d0· 572 bytes, up to0x6a840b- Signature
void __thiscall (CMapDoodadDef *this, const NTempest::C44Matrix *m)- Meaning
- Poses a doodad def again under a matrix and rebuilds its bounds
- Confidence
- verified, proof one
- Finding
- terrain/doodads#doodad-re-pose
- Test
terrain::chunk_fade_scale_twin_difftest
Finding: Doodad re-pose in terrain: doodad defs
0x6a81d0(def, matrix) leaves a def without a model (+0x88) alone. Otherwise it sets bit 0 of +0xc, sets the position +0x24 to the local position +0x13c moved by the matrix, and +0xcc to the saved local matrix +0x10c times the matrix. A loaded model gives the sphere centre moved by +0xcc (into +0x5c), its radius times the scale +0x30 (into +0x68), and its bounding and collision boxes moved by +0xcc into +0x44 and +0x14c; an unloaded model gives zeros, so the sphere is +0xcc's translation with radius 0. A sound handle +0x168 moves to +0x24.
The derivation is in the doc.
Callers 1
- UpdatePlacementGroupDoodads terrain
Callees 10
- SplatVector3 loadingscreen
- MoveEmitter sound
- TransformBox unassigned
- CM2Model::IsLoaded models
- CM2Model::GetBoundingBox models
- CM2Model::GetBoundingSphere models
- CM2Model::GetCollisionBox models
- MultiplyMatrix4 cmath
- TransformPoint cmath
- TransformPointInPlace cmath
Calls and jumps by a bare address, from tables/calls.tsv.