ValidateNearestDistance
function · ui · primitive
- Address
0x490720· 77 bytes, up to0x49076c- Signature
uint8_t __stdcall (const char *text, void *arg)- Meaning
- Accepts a nearest-target distance option from 1 to 50, else prints the range and refuses
- 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.
Callers 0
None by a direct call or jump.
Callees 2
- ConsolePrintf console
- SStrToFloat storm
Calls and jumps by a bare address, from tables/calls.tsv.