Script::CheckInteractDistance
function · ui · primitive
- Address
0x48ba00· 343 bytes, up to0x48bb56- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes 1 when the unit is within the range of the given index 1 to 4, else nil
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/distancegates#checkinteractdistance
- Test
ui::check_interact_dist2
Finding: CheckInteractDistance in ui: distance gates and range checks
CheckInteractDistance(unit, index) raises Usage: CheckInteractDistance("unit", distIndex) for a non-string unit or a non-number index. It pushes nil with no error when there is no active player, when the token resolves to no object, or when the truncated index is not 1 to 4 (an unsigned compare of index - 1 against 4).
Otherwise it pushes the number 1 when the squared distance is below the indexed threshold, else nil. A string index that reads as a number counts.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 11
- __ftol crt
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- GetUnitFromToken ui
- lua_isnumber lua
- lua_isstring lua
- lua_tonumber lua
- lua_tostring lua
- lua_pushnil lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.