CWorld::UpdateFadingModels
function · terrain · primitive
- Address
0x672ef0· 344 bytes, up to0x673047- Signature
void __cdecl (void)- Meaning
- Sets each fading model's alpha by (3 - 2t)t² of its age and releases it when done
- Confidence
- verified, proof one
- Finding
- terrain/world#model-fade-out
- Test
terrain::doodad_despawn_fade_difftest
Finding: Model fade-out in terrain: world
0x672df0 fades a removed model: when the model is ready and the fade value is at least 0.01
(or NaN) it records the model, the clock time and the value, and installs 0x672d20 as the model's
callback; otherwise it releases the model at once. 0x672ef0 runs each frame: a record older
than 2000 ms releases its model; a younger one sets the model's alpha to (3 − 2x)x², x = (1 −
age × 0.0005) × the value, with 0 for x ≤ 0 and 1 for x > 1.
The derivation is in the doc.
Callers 1
Callees 4
- OsGetAsyncTimeMs core
- ReleaseWorldObject terrain
- UnlinkLink terrain
- CM2Model::SetAlpha models
Calls and jumps by a bare address, from tables/calls.tsv.