INextBot::GetRangeTo
0x00753bb0 · 133 bytes · __thiscall
_ZNK8INextBot10GetRangeToEP11CBaseEntity
Decompiled
undefined (2 params)
/* INextBot::GetRangeTo(CBaseEntity*) const */
longdouble __thiscall INextBot::GetRangeTo(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;
}
return (longdouble)0.0;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.