L L4D2node

CParticleSystemMgr::GetParticleSystemsInBuffer

0x00bcfc70 · 334 bytes · __thiscall

_ZN18CParticleSystemMgr26GetParticleSystemsInBufferER10CUtlBufferP10CUtlVectorI10CUtlString10CUtlMemoryIS3_iEE

Decompiled

undefined (3 params)

/* CParticleSystemMgr::GetParticleSystemsInBuffer(CUtlBuffer&, CUtlVector<CUtlString,
   CUtlMemory<CUtlString, int> >*) */

void __thiscall
CParticleSystemMgr::GetParticleSystemsInBuffer
          (CParticleSystemMgr *this,CUtlBuffer *param_1,CUtlVector *param_2)

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  CDmxElement *local_40;
  CUtlString local_3c [16];
  CUtlString local_2c [28];
  
  if (param_2 != (CUtlVector *)0x0) {
    CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::RemoveAll
              ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)param_2);
    BeginDMXContext();
                    /* try { // try from 00bcfca6 to 00bcfce7 has its CatchHandler @ 00bcfde9 */
    cVar1 = UnserializeDMX(param_1,&local_40,(char *)0x0);
    if (cVar1 != '\0') {
      pcVar2 = (char *)CDmxElement::GetTypeString(local_40);
      iVar3 = _V_stricmp(pcVar2,"DmeParticleSystemDefinition");
      if (iVar3 == 0) {
        pcVar2 = (char *)CDmxElement::GetName(local_40);
        CUtlString::CUtlString(local_3c,pcVar2);
                    /* try { // try from 00bcfcf6 to 00bcfcfa has its CatchHandler @ 00bcfded */
        CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
                  ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)param_2,
                   *(int *)(param_2 + 0xc),local_3c);
        CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_3c);
                    /* try { // try from 00bcfd09 to 00bcfd0d has its CatchHandler @ 00bcfde9 */
        CleanupDMX(local_40);
      }
      else {
                    /* try { // try from 00bcfd36 to 00bcfd8b has its CatchHandler @ 00bcfde9 */
        piVar4 = (int *)CDmxElement::GetAttribute(local_40,"particleSystemDefinitions");
        if ((piVar4 != (int *)0x0) && (*piVar4 == 0xf)) {
          piVar4 = (int *)piVar4[2];
          iVar3 = piVar4[3];
          if (0 < iVar3) {
            iVar5 = 0;
            do {
              pcVar2 = (char *)CDmxElement::GetName(*(CDmxElement **)(*piVar4 + iVar5 * 4));
              CUtlString::CUtlString(local_2c,pcVar2);
                    /* try { // try from 00bcfd9a to 00bcfd9e has its CatchHandler @ 00bcfdcb */
              CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
                        ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)param_2,
                         *(int *)(param_2 + 0xc),local_2c);
              iVar5 = iVar5 + 1;
              CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_2c);
            } while (iVar5 != iVar3);
          }
                    /* try { // try from 00bcfdb5 to 00bcfdb9 has its CatchHandler @ 00bcfde9 */
          CleanupDMX(local_40);
          EndDMXContext(true);
          return;
        }
        CleanupDMX(local_40);
      }
    }
    EndDMXContext(true);
  }
  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)