L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)