M2LightStateConstruct
function · models · orchestration
- Address
0x71b370· 295 bytes, up to0x71b496- Meaning
- Constructs a model light state: cleared tracks, an initialized light, enabled
- Confidence
- verified, proof one
- Finding
- models/lights#model-light-tracks
Finding: Model light tracks in models: lights
Each model light has a 0x170-byte state at instance +0x200, its light object at +0x104 and its
enabled word at +0x100 (1 from the constructor, set by SetLightEnabled). Animation samples the
record's visibility byte track (+0xb8) into +0xec; when the light is disabled or invisible,
later updates skip it. Each colour product is recomputed only when its colour track is sampled:
ambient = ambient colour (+0x10) × ambient intensity (+0x2c) × instance alpha +0x19c, into
the light's +0x30; diffuse likewise from +0x48 and +0x64 into +0x3c. The attenuation
tracks +0x80 and +0x9c are never sampled, so model lights keep 0, 0.7 and 0.03.
The derivation is in the doc.
Callers 1
- CM2Model::InitializeLoaded models
Callees 4
- SplatVector3 loadingscreen
- M2TrackStateClear models
- M2Vec3TrackStateClear models
- M2LightInitialize models
Calls and jumps by a bare address, from tables/calls.tsv.