L L4D2node

CFire::SpawnEffect

0x0069ed10 · 461 bytes · __cdecl

_ZN5CFire11SpawnEffectE10fireType_ef

Decompiled

undefined (2 params)

/* CFire::SpawnEffect(fireType_e, float) */

void CFire::SpawnEffect(CBaseEntity *param_1,int param_2)

{
  CBaseEntity CVar1;
  CBaseEntity *this;
  undefined4 *puVar2;
  
  if (param_2 == 1) {
    this = (CBaseEntity *)CreateEntityByName("_plasma",-1,true);
    CPlasma::EnableSmoke((CPlasma *)this,1);
    *(undefined4 *)(param_1 + 0x448) = 1;
    if (param_1[0x105] != (CBaseEntity)0x2) {
      (**(code **)(*(int *)param_1 + 0x224))(param_1,param_1 + 0x105);
      param_1[0x105] = (CBaseEntity)0x2;
    }
    CBaseEntity::EmitSound(param_1,"Fire.Plasma",0.0,(float *)0x0);
    CVar1 = param_1[0x14d];
  }
  else {
    this = (CBaseEntity *)CreateEntityByName("_firesmoke",-1,true);
    CFireSmoke::EnableSmoke((CFireSmoke *)this,(uint)(((byte)param_1[0x148] & 2) == 0));
    CFireSmoke::EnableGlow((CFireSmoke *)this,(uint)(((byte)param_1[0x148] & 0x20) == 0));
    CFireSmoke::EnableVisibleFromAbove((CFireSmoke *)this,*(uint *)(param_1 + 0x148) >> 8 & 1);
    *(undefined4 *)(param_1 + 0x448) = 0;
    if (param_1[0x105] != (CBaseEntity)0x2) {
      (**(code **)(*(int *)param_1 + 0x224))(param_1,param_1 + 0x105);
      param_1[0x105] = (CBaseEntity)0x2;
    }
    CVar1 = param_1[0x14d];
  }
  if (((byte)CVar1 & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  UTIL_SetOrigin(this,(Vector *)(param_1 + 0x2e0),false);
  (**(code **)(*(int *)this + 100))(this);
  (**(code **)(*(int *)this + 0x98))(this,param_1,0xffffffff);
  (**(code **)(*(int *)this + 0x328))
            (this,*(undefined4 *)(param_1 + 0x458),*(undefined4 *)(param_1 + 0x458),0);
  (**(code **)(*(int *)this + 0x32c))(this,*(uint *)(param_1 + 0x148) & 4);
  puVar2 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
  *(undefined4 *)(param_1 + 0x440) = *puVar2;
  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)