benilla-re systems structs docs

SpellTargetLocationInRange

function · spell · primitive

Address
0x6e6810 · 218 bytes, up to 0x6e68e9
Signature
uint8_t __fastcall (const float *position, uint8_t checkRange)
Meaning
Returns whether a position target is wanted and, with checkRange, within the spell's range of the caster
Confidence
verified, proof one
Finding
spell/targeting#location-range-test
Test
spell::spell_target_in_range_difftest

Finding: Location range test in spell: targeting

0x6e6810 returns whether a position at ecx is within the pending spell's range of the caster. It returns 0 when the word has neither 0x20 nor 0x40 or the caster is gone, 1 when dl is 0, and otherwise 1 exactly when min² ≤ d ≤ max² with d = (dx² + dz²) + dy², caster minus position, rounded to a float; a NaN fails. The range comes from 0x6e3480 with no target object.

The derivation is in the doc.

Callers 1

Callees 3

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