L L4D2node

CParticleSystemMgr::AttachKillList

0x00bcdf30 · 134 bytes · __thiscall

_ZN18CParticleSystemMgr14AttachKillListEP19CParticleCollection

Decompiled

undefined (2 params)

/* CParticleSystemMgr::AttachKillList(CParticleCollection*) */

void __thiscall
CParticleSystemMgr::AttachKillList(CParticleSystemMgr *this,CParticleCollection *param_1)

{
  void *pvVar1;
  uint uVar2;
  bool bVar3;
  
  uVar2 = 0;
  do {
    if ((&g_nKillBufferInUse)[uVar2] == 0) {
      LOCK();
      bVar3 = (&g_nKillBufferInUse)[uVar2] == 0;
      if (bVar3) {
        (&g_nKillBufferInUse)[uVar2] = 1;
      }
      UNLOCK();
      if (bVar3) {
        if ((&g_pKillBuffers)[uVar2] != 0) {
          *(undefined4 *)(param_1 + 0x374) = (&g_pKillBuffers)[uVar2];
          return;
        }
        pvVar1 = operator_new__(20000);
        (&g_pKillBuffers)[uVar2] = pvVar1;
        *(void **)(param_1 + 0x374) = pvVar1;
        return;
      }
    }
    uVar2 = uVar2 + 1;
    if (0xf < uVar2) {
      uVar2 = 0;
      ThreadSleep(0);
    }
  } while( true );
}

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)