L L4D2node

CEnvMuzzleFlash::Spawn

0x0066c5c0 · 322 bytes · __thiscall

_ZN15CEnvMuzzleFlash5SpawnEv

Decompiled

undefined (1 param)

/* CEnvMuzzleFlash::Spawn() */

void __thiscall CEnvMuzzleFlash::Spawn(CEnvMuzzleFlash *this)

{
  uint uVar1;
  int iVar2;
  CBaseAnimating *this_00;
  undefined *puVar3;
  int *piVar4;
  char *pcVar5;
  undefined4 uVar6;
  
  if (*(int *)(this + 0x444) != 0) {
    uVar1 = *(uint *)(this + 0x180);
    if ((((uVar1 != 0xffffffff) &&
         (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
       (piVar4 = *(int **)(puVar3 + 4), piVar4 != (int *)0x0)) {
      iVar2 = (**(code **)(*piVar4 + 0xf0))(piVar4);
      if (iVar2 != 0) {
        uVar1 = *(uint *)(this + 0x180);
        piVar4 = (int *)0x0;
        if (((uVar1 != 0xffffffff) &&
            (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
          piVar4 = *(int **)(puVar3 + 4);
        }
        this_00 = (CBaseAnimating *)(**(code **)(*piVar4 + 0xf0))(piVar4);
        pcVar5 = "";
        if (*(char **)(this + 0x444) != (char *)0x0) {
          pcVar5 = *(char **)(this + 0x444);
        }
        iVar2 = CBaseAnimating::LookupAttachment(this_00,pcVar5);
        if (iVar2 != 0) {
          uVar6 = 0;
          uVar1 = *(uint *)(this + 0x180);
          if (((uVar1 != 0xffffffff) &&
              (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc))
             && (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
            uVar6 = *(undefined4 *)(puVar3 + 4);
          }
          (**(code **)(*(int *)this + 0x98))(this,uVar6,iVar2);
          CBaseEntity::SetLocalOrigin((CBaseEntity *)this,(Vector *)&vec3_origin);
          CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&vec3_angle);
          return;
        }
      }
    }
  }
  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)