L L4D2node

ParticleSmokeGrenade::ParticleSmokeGrenade

0x0076f5c0 · 347 bytes · __thiscall

_ZN20ParticleSmokeGrenadeC1Ev

Decompiled

undefined (1 param)

/* ParticleSmokeGrenade::ParticleSmokeGrenade() */

void __thiscall ParticleSmokeGrenade::ParticleSmokeGrenade(ParticleSmokeGrenade *this)

{
  float fVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  
  CBaseParticleEntity::CBaseParticleEntity((CBaseParticleEntity *)this);
  *(undefined ***)this = &PTR__ParticleSmokeGrenade_00cabac8;
  *(undefined4 *)(this + 0x450) = 0xffffffff;
  if (this[0x440] != (ParticleSmokeGrenade)0x0) {
    if (this[0x6c] == (ParticleSmokeGrenade)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (ParticleSmokeGrenade)((byte)this[0x70] | 1);
    }
    this[0x440] = (ParticleSmokeGrenade)0x0;
  }
  if (*(float *)(this + 0x448) != 17.0) {
    if (this[0x6c] == (ParticleSmokeGrenade)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (ParticleSmokeGrenade)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x448) = 0x41880000;
  }
  if (*(float *)(this + 0x44c) != 22.0) {
    if (this[0x6c] == (ParticleSmokeGrenade)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (ParticleSmokeGrenade)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x44c) = 0x41b00000;
  }
  fVar1 = *(float *)(gpGlobals + 0xc);
  if (fVar1 == *(float *)(this + 0x444)) {
    return;
  }
  if (this[0x6c] == (ParticleSmokeGrenade)0x0) {
    pCVar2 = *(CBaseEdict **)(this + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
                    /* try { // try from 0076f652 to 0076f6fa has its CatchHandler @ 0076f74f */
      iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar3 + 2) = 0;
    }
    *(float *)(this + 0x444) = fVar1;
  }
  else {
    this[0x70] = (ParticleSmokeGrenade)((byte)this[0x70] | 1);
    *(float *)(this + 0x444) = fVar1;
  }
  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)