L L4D2node

GetParticleManifest

0x00bcfec0 · 317 bytes · __cdecl

_Z19GetParticleManifestR10CUtlVectorI10CUtlString10CUtlMemoryIS0_iEEPKc

Decompiled

undefined (2 params)

/* GetParticleManifest(CUtlVector<CUtlString, CUtlMemory<CUtlString, int> >&, char const*) */

void GetParticleManifest(CUtlVector *param_1,char *param_2)

{
  char cVar1;
  KeyValues *pKVar2;
  IBaseFileSystem *pIVar3;
  char *pcVar4;
  int iVar5;
  undefined4 uVar6;
  uint in_stack_ffffffb8;
  CUtlString local_2c [28];
  
  pKVar2 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffb8);
                    /* try { // try from 00bcfef7 to 00bcfefb has its CatchHandler @ 00bd0008 */
  KeyValues::KeyValues(pKVar2,param_2,(IKeyValuesSystem *)0x0,false);
  pIVar3 = (IBaseFileSystem *)0x0;
  if (g_pFullFileSystem != 0) {
    pIVar3 = (IBaseFileSystem *)(g_pFullFileSystem + 4);
  }
  cVar1 = KeyValues::LoadFromFile(pKVar2,pIVar3,param_2,"GAME");
  if (cVar1 == '\0') {
    Warning("PARTICLE SYSTEM: Unable to load manifest file \'%s\'\n",param_2);
  }
  else {
    for (pKVar2 = (KeyValues *)KeyValues::GetFirstSubKey(pKVar2); pKVar2 != (KeyValues *)0x0;
        pKVar2 = (KeyValues *)KeyValues::GetNextKey(pKVar2)) {
      pcVar4 = (char *)KeyValues::GetName(pKVar2);
      iVar5 = _V_stricmp(pcVar4,"file");
      if (iVar5 == 0) {
        pcVar4 = (char *)KeyValues::GetString(pKVar2,(char *)0x0,"");
        CUtlString::CUtlString(local_2c,pcVar4);
                    /* try { // try from 00bcff92 to 00bcff96 has its CatchHandler @ 00bd001d */
        CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
                  ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)param_1,
                   *(int *)(param_1 + 0xc),local_2c);
        CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_2c);
      }
      else {
        uVar6 = KeyValues::GetName(pKVar2);
        Warning("CParticleMgr::Init:  Manifest \'%s\' with bogus file type \'%s\', expecting \'file\'\n"
                ,param_2,uVar6);
      }
    }
  }
  KeyValues::deleteThis();
  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)