L L4D2node

SV_AddToFatPVS

0x001fb500 · 137 bytes · __regparm3

_ZL14SV_AddToFatPVSRK6Vector

Decompiled

undefined (1 param)

/* SV_AddToFatPVS(Vector const&) */

void __regparm3 SV_AddToFatPVS(Vector *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  byte local_2010 [8192];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = CM_PointLeafnum(param_1);
  iVar2 = CM_LeafCluster(iVar2);
  CM_Vis(local_2010,0x2000,iVar2,0);
  iVar1 = s_FatBytes;
  iVar2 = s_pFatPVS;
  if (0 < s_FatBytes) {
    iVar3 = 0;
    do {
      *(byte *)(iVar2 + iVar3) = *(byte *)(iVar2 + iVar3) | local_2010[iVar3];
      iVar3 = iVar3 + 1;
    } while (iVar3 != iVar1);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)