benilla-re systems structs docs

s_piCopyTargeting

global · unassigned

Address
0x804488 · 4 bytes, up to 0x80448b
Type
float
Meaning
Holds pi (0x40490fdb), read by the nearby-unit collector
Confidence
verified, proof one
Finding
ui/targeting#collecting-the-candidates

Finding: Collecting the candidates in ui: selecting a target

The collector 0x494200 runs for every object. It keeps a unit that passes the cached kind's filter, is drawn, and lies within a distance of the player: targetNearestDistance (default 41) when it is in front, targetNearestDistanceRadius (default 10) when it is not. In front is a heading from the player to the unit within 30 degrees of the player's facing, either side. The record stored is the GUID, the squared distance as a float, and the in-front flag. Units of a creature type whose record has bit 0 of +0x28 set are skipped. The sort puts in-front units first and then ascending distance. Both options must lie between 1 and 50.

The derivation is in the doc.