UTIL_SetClientVisibilityPVS
0x00b2e190 · 174 bytes · __cdecl
_Z27UTIL_SetClientVisibilityPVSP7edict_tPKhi
Decompiled
undefined (3 params)
/* UTIL_SetClientVisibilityPVS(edict_t*, unsigned char const*, int) */
void UTIL_SetClientVisibilityPVS(edict_t *param_1,uchar *param_2,int param_3)
{
edict_t *peVar1;
int iVar2;
byte *pbVar3;
int iVar4;
char *pcVar5;
peVar1 = (edict_t *)UTIL_GetCurrentCheckClient();
if (peVar1 == param_1) {
g_CheckClient[0x4018] = 0;
iVar4 = param_3 + 3;
if (-1 < param_3) {
iVar4 = param_3;
}
iVar2 = 0;
iVar4 = iVar4 >> 2;
if (0 < iVar4) {
do {
*(uint *)(g_CheckClient + iVar2 * 4 + 0x200c) =
~*(uint *)(g_CheckClient + iVar2 * 4 + 0xc) & *(uint *)(param_2 + iVar2 * 4);
if (*(int *)(param_2 + iVar2 * 4) != 0) {
g_CheckClient[0x4018] = 1;
}
iVar2 = iVar2 + 1;
} while (iVar2 != iVar4);
}
if (0 < param_3 % 4) {
iVar4 = iVar4 * 4;
pbVar3 = param_2 + iVar4;
pcVar5 = g_CheckClient + iVar4 + 0xc;
do {
pcVar5[0x2000] = *pcVar5 == '\0' & *pbVar3;
if (*pbVar3 != 0) {
g_CheckClient[0x4018] = 1;
}
pbVar3 = pbVar3 + 1;
pcVar5 = pcVar5 + 1;
} while (pbVar3 != param_2 + iVar4 + param_3 % 4);
return;
}
}
return;
}
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.