benilla-re systems structs docs

Sound::AddToCutoffList

function · sound · primitive

Address
0x7a6240 · 103 bytes, up to 0x7a62a6
Meaning
Links a sound on the cutoff list and sets its flag
Confidence
verified, proof one
Name from
the community database (idb)
Finding
sound/engine#distance-cutoff

Finding: Distance cutoff in sound: the engine

Sound::SetCutoffDistanceSquared(c) stores the distance c (not its square) for a 3D sound: 0 removes the sound from the cutoff list; otherwise it joins it, and a looped sound at or beyond c of the listener, or at a NaN distance, is paused under reason 3 and flagged cut off. Each frame, a listed sound strictly beyond c is skipped if cut off, suspended if looped, left playing if flagged 0x4, and released otherwise. In range its distance gain is 1 − min(max(d − 0.9c, 0), k) / k with k = c · 0.10000002: recomputed every frame between 0.9c and c, and once on entering 0.9c, which leaving re-arms. A cut-off sound coming back resumes, restarting its stream.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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