benilla-re systems structs docs

s_shadowedIntensity

global · terrain

Address
0x810a64 · 4 bytes, up to 0x810a67
Type
float
Meaning
Holds 0.5, an entity light's intensity target in shadow
Confidence
verified, proof two
Finding
terrain/mapentities#unit-light-node-lifecycle

Finding: Unit light node lifecycle in terrain: map entities

0x613e10 creates a unit's or player's node through 0x670db0, which sets the intensity +0xa4 and its target +0xf8 to 1.0 and the position +0x24 to 1.0e7. The same call's sync moves the node off 1.0e7 and so recomputes the target (Entity environment): 1.0 as an interior, else 2.5, or 0.5 in the chunk's shadow, unsampled on a map object. Each unit tick with its model loaded, before the draw, steps +0xa4 toward the target by 3.3333333 × 0xc62510, the previous frame's time, and stops at it; step and sum stay in the 53-bit register, the store rounds to f32 and the clamp compares the register. From 1.0 toward 2.5 the first loaded tick gives min(2.5, 1.0 + 3.3333333·dt).

The derivation is in the doc.