L L4D2node

ParseParticleEffects

0x00472690 · 237 bytes · __cdecl

_Z20ParseParticleEffectsb

Decompiled

undefined (1 param)

/* ParseParticleEffects(bool) */

void ParseParticleEffects(bool param_1)

{
  char *pcVar1;
  CUtlMemory<unsigned_char,int> *this;
  int iVar2;
  int iVar3;
  int local_30 [8];
  
  CParticleSystemMgr::ShouldLoadSheets((CParticleSystemMgr *)g_pParticleSystemMgr,param_1);
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
                    /* try { // try from 004726d7 to 0047272c has its CatchHandler @ 0047277d */
  GetParticleManifest((CUtlVector *)local_30);
  iVar3 = local_30[3];
  iVar2 = 0;
  if (0 < local_30[3]) {
    do {
      pcVar1 = CUtlString::operator_cast_to_char_((CUtlString *)(iVar2 * 0x10 + local_30[0]));
      CParticleSystemMgr::ReadParticleConfigFile
                ((CParticleSystemMgr *)g_pParticleSystemMgr,pcVar1,false,false);
      iVar2 = iVar2 + 1;
    } while (iVar2 != iVar3);
  }
  CParticleSystemMgr::DecommitTempMemory();
  iVar3 = local_30[3] + -1;
  iVar2 = iVar3 * 0x10;
  if (-1 < iVar3) {
    do {
      iVar3 = iVar3 + -1;
      this = (CUtlMemory<unsigned_char,int> *)(local_30[0] + iVar2);
      iVar2 = iVar2 + -0x10;
      CUtlMemory<unsigned_char,int>::Purge(this);
    } while (iVar3 != -1);
  }
  local_30[3] = 0;
  CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
  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)