CWorld::SetObjectModel
function · terrain · orchestration
- Address
0x6716f0· 75 bytes, up to0x67173a- Signature
void __fastcall (void *object, void *model)- Meaning
- Swaps a world object's model, moving its light callback
- Confidence
- verified, proof one
- Finding
- terrain/world#model-lighting-callback
Finding: Model lighting callback in terrain: world
A model on the map takes its light from 0x672a20, which 0x6716f0 installs as the model's
lighting callback when the model is set (and removes from the old model). With a node it calls
the node's virtual slots 1 (fog) and 3 (water plane), and slot 2 (the map lights) only when the
node's +0x78 − +0x68 is below the fog end; if the node's +0x8 has bit 0x20 it sets +0x1b0 of
the model's lighting record to 1. Without a node it adds the day-night ambient +0x178 and the
directional +0x174 with direction +0x168 of the light state.
The derivation is in the doc.
Callers 3
- CGObject_C::SetModel objectlayer
- CGObject_C::SetModel2 objectlayer
- CMissile::ArriveWithoutTarget objectlayer
Callees 3
- CM2Model::AddRef models
- HandleClose2 models
- CM2Model::SetLightingCallback models
Calls and jumps by a bare address, from tables/calls.tsv.