L L4D2node

INextBot::GetRangeSquaredTo

0x00753c40 · 137 bytes · __thiscall

_ZNK8INextBot17GetRangeSquaredToEP11CBaseEntity

Decompiled

undefined (2 params)

/* INextBot::GetRangeSquaredTo(CBaseEntity*) const */

longdouble __thiscall INextBot::GetRangeSquaredTo(INextBot *this,CBaseEntity *param_1)

{
  int iVar1;
  Vector *pVVar2;
  longdouble lVar3;
  Vector local_28 [24];
  
  iVar1 = (**(code **)(*(int *)this + 0xb4))(this);
  if ((iVar1 != 0) && (param_1 != (CBaseEntity *)0x0)) {
    pVVar2 = (Vector *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
    CCollisionProperty::CalcNearestPoint((CCollisionProperty *)(iVar1 + 0x194),pVVar2,local_28);
    lVar3 = (longdouble)
            CCollisionProperty::CalcDistanceFromPoint
                      ((CCollisionProperty *)(param_1 + 0x194),local_28);
    return (longdouble)((float)lVar3 * (float)lVar3);
  }
  return (longdouble)0.0;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)