IHandleEntityEntindexCompare
0x00519980 · 154 bytes · __cdecl
_ZL28IHandleEntityEntindexComparePKP13IHandleEntityS2_
Decompiled
undefined (2 params)
/* IHandleEntityEntindexCompare(IHandleEntity* const*, IHandleEntity* const*) */
bool IHandleEntityEntindexCompare(IHandleEntity **param_1,IHandleEntity **param_2)
{
IHandleEntity *pIVar1;
int iVar2;
char cVar3;
int iVar4;
IHandleEntity *pIVar5;
IHandleEntity *pIVar6;
pIVar6 = *param_1;
cVar3 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,pIVar6);
if (cVar3 != '\0') {
pIVar6 = (IHandleEntity *)0x0;
}
pIVar1 = *param_2;
cVar3 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,pIVar1);
pIVar5 = (IHandleEntity *)0x0;
if (cVar3 == '\0') {
pIVar5 = pIVar1;
}
if (*(int *)(pIVar6 + 0x30) == 0) {
iVar2 = *(int *)(pIVar5 + 0x30);
iVar4 = 0;
}
else {
iVar2 = *(int *)(pIVar5 + 0x30);
iVar4 = *(int *)(pIVar6 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
if (iVar2 != 0) {
return iVar4 < iVar2 - *(int *)(gpGlobals + 0x58) >> 4;
}
return iVar4 < 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.