CMoveHelperServer::IsWorldEntity
0x006f6c60 · 114 bytes · __thiscall
_ZN17CMoveHelperServer13IsWorldEntityERK11CBaseHandle
Decompiled
undefined (2 params)
/* CMoveHelperServer::IsWorldEntity(CBaseHandle const&) */
bool __thiscall CMoveHelperServer::IsWorldEntity(CMoveHelperServer *this,CBaseHandle *param_1)
{
byte *pbVar1;
int *piVar2;
uint uVar3;
int iVar4;
undefined *puVar5;
pbVar1 = *(byte **)(gpGlobals + 0x58);
if (((pbVar1 == (byte *)0x0) || ((*pbVar1 & 2) != 0)) ||
(piVar2 = *(int **)(pbVar1 + 0xc), piVar2 == (int *)0x0)) {
iVar4 = 0;
}
else {
iVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);
}
uVar3 = *(uint *)param_1;
if (((uVar3 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar3 >> 0xc)) {
return *(int *)(puVar5 + 4) == iVar4;
}
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.