benilla-re systems structs docs

AnimateMapEntityLight

function · terrain · primitive

Address
0x69e770 · 429 bytes, up to 0x69e91c
Signature
void __thiscall (void *this)
Meaning
Steps an entity's ambient bytes and intensity toward their targets by the frame time
Confidence
verified, proof one
Finding
terrain/mapentities#entity-light-ramp
Test
terrain::color_step_magnitude_difftest, terrain::intensity_ramp_difftest

Finding: Entity light ramp in terrain: map entities

0x69e770 moves an entity's light toward its targets each frame. Each byte of the ambient word +0x9c steps toward the target +0xf4 by max(1, trunc(2.0 × dt × 255)) and stops at it. With no channel changing and the entity not indoors, the ambient word and its target become the day light's ambient +0x178. The intensity +0xa4 moves toward +0xf8 by 3.3333333 × dt and stops at it. If the entity's attachment list +0x20 is empty (odd) or unset (zero), 0x69e280 runs after.

The derivation is in the doc.

Callers 1

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.