UTIL_FindClientInPVSGuts
0x00b2e2d0 · 212 bytes · __cdecl
_Z24UTIL_FindClientInPVSGutsP7edict_tPhj
Decompiled
undefined (3 params)
/* UTIL_FindClientInPVSGuts(edict_t*, unsigned char*, unsigned int) */
int UTIL_FindClientInPVSGuts(edict_t *param_1,uchar *param_2,uint param_3)
{
char cVar1;
int iVar2;
int iVar3;
int *piVar4;
undefined4 local_24;
undefined4 local_20;
undefined4 local_1c;
undefined4 local_18;
undefined4 local_14;
undefined4 local_10;
iVar2 = UTIL_GetCurrentCheckClient();
if (iVar2 == 0) {
return 0;
}
piVar4 = *(int **)(iVar2 + 0xc);
if ((((piVar4 == (int *)0x0) || (iVar3 = (**(code **)(*piVar4 + 0x18))(piVar4), iVar3 == 0)) ||
((*(byte *)(iVar3 + 0x151) & 0x80) != 0)) && (*(int *)(sv_strict_notarget._28_4_ + 0x30) != 0)
) {
return 0;
}
if (((param_1 != (edict_t *)0x0) && (piVar4 = *(int **)(param_1 + 0xc), piVar4 != (int *)0x0)) &&
(piVar4 = (int *)(**(code **)(*piVar4 + 0x18))(piVar4), piVar4 != (int *)0x0)) {
(**(code **)(*piVar4 + 0x234))(&local_18,piVar4);
local_24 = local_18;
local_20 = local_14;
local_1c = local_10;
cVar1 = (**(code **)(*engine + 0x38))(engine,&local_24,param_2,param_3);
if (cVar1 == '\0') {
return 0;
}
}
return iVar2;
}
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.