L L4D2node

CPrecacheHandler::PrecachePhysicsSounds

0x00497210 · 807 bytes · __thiscall

_ZN16CPrecacheHandler21PrecachePhysicsSoundsEPKcbP16ResourceList_t__

Decompiled

undefined (4 params)

/* CPrecacheHandler::PrecachePhysicsSounds(char const*, bool, ResourceList_t__*) */

void __thiscall
CPrecacheHandler::PrecachePhysicsSounds
          (CPrecacheHandler *this,char *param_1,bool param_2,ResourceList_t__ *param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  
  if (param_2) {
    iVar1 = _V_stricmp(param_1,"BulletSounds");
    iVar2 = _V_stricmp(param_1,"StepSounds");
    iVar3 = _V_stricmp(param_1,"PhysicsImpactSounds");
    for (iVar6 = 0; iVar4 = (**(code **)(*physprops + 0xc))(physprops), iVar6 < iVar4;
        iVar6 = iVar6 + 1) {
      iVar4 = (**(code **)(*physprops + 0x18))(physprops,iVar6);
      if (iVar1 == 0) {
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x3c));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
      }
      if (iVar2 == 0) {
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x2c));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x2e));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
      }
      if (iVar3 == 0) {
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x34));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x36));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x38));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x3a));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x3e));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x40));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
        uVar5 = (**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar4 + 0x42));
        (*(code *)**(undefined4 **)this)(this,3,uVar5,1,param_3,0);
      }
    }
  }
  return;
}

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)