L L4D2node

CEnvParticleScript::Activate

0x00692de0 · 329 bytes · __thiscall

_ZN18CEnvParticleScript8ActivateEv

Decompiled

undefined (1 param)

/* CEnvParticleScript::Activate() */

void __thiscall CEnvParticleScript::Activate(CEnvParticleScript *this)

{
  float fVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  float fVar4;
  
  CBaseAnimating::Activate((CBaseAnimating *)this);
  CBaseEntity::DetectInSkybox((CBaseEntity *)this);
  iVar3 = CBaseEntity::GetEntitySkybox((CBaseEntity *)this);
  if (iVar3 == 0) {
    if (*(float *)(this + 0x13f4) != 1.0) {
      if (this[0x6c] == (CEnvParticleScript)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] = (CEnvParticleScript)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + 0x13f4) = 0x3f800000;
    }
  }
  else {
    fVar4 = (float)*(int *)(iVar3 + 0x444);
    if (fVar4 == 0.0) {
      fVar4 = 1.0;
      if (*(float *)(this + 0x13f4) != 1.0) goto LAB_00692e4c;
    }
    else if (fVar4 != *(float *)(this + 0x13f4)) {
LAB_00692e4c:
      if (this[0x6c] == (CEnvParticleScript)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] = (CEnvParticleScript)((byte)this[0x70] | 1);
      }
      fVar1 = *(float *)(this + 0x468);
      *(float *)(this + 0x13f4) = fVar4;
      goto joined_r0x00692e90;
    }
  }
  fVar1 = *(float *)(this + 0x468);
joined_r0x00692e90:
  if (fVar1 == 1.0) {
    return;
  }
  if (this[0x6c] == (CEnvParticleScript)0x0) {
    pCVar2 = *(CBaseEdict **)(this + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
      iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar3 + 2) = 0;
    }
    *(undefined4 *)(this + 0x468) = 0x3f800000;
  }
  else {
    this[0x70] = (CEnvParticleScript)((byte)this[0x70] | 1);
    *(undefined4 *)(this + 0x468) = 0x3f800000;
  }
  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)