L L4D2node

CStaticPropMgr::IsPropInPVS

0x001e48f0 · 138 bytes · __thiscall

_ZNK14CStaticPropMgr11IsPropInPVSEP13IHandleEntityPKh

Decompiled

undefined (3 params)

/* CStaticPropMgr::IsPropInPVS(IHandleEntity*, unsigned char const*) const */

undefined4 __thiscall
CStaticPropMgr::IsPropInPVS(CStaticPropMgr *this,IHandleEntity *param_1,uchar *param_2)

{
  uint *puVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  
  puVar1 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
  iVar2 = (*puVar1 & 0xfff) * 0xd8 + *(int *)(this + 0x20);
  uVar5 = (uint)*(ushort *)(iVar2 + 0x42);
  iVar6 = uVar5 * 2;
  uVar3 = *(ushort *)(iVar2 + 0x44) + uVar5;
  if (uVar5 < uVar3) {
    do {
      uVar4 = CM_LeafCluster((uint)*(ushort *)(*(int *)(this + 0x34) + iVar6));
      if ((param_2[(int)uVar4 >> 3] >> (uVar4 & 7) & 1) != 0) {
        return 1;
      }
      uVar5 = uVar5 + 1;
      iVar6 = iVar6 + 2;
    } while ((int)uVar5 < (int)uVar3);
  }
  return 0;
}

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)