L L4D2node

CSpriteTrail::Spawn

0x004c44e0 · 254 bytes · __thiscall

_ZN12CSpriteTrail5SpawnEv

Decompiled

undefined (1 param)

/* CSpriteTrail::Spawn() */

void __thiscall CSpriteTrail::Spawn(CSpriteTrail *this)

{
  undefined1 *puVar1;
  CBaseEdict *this_00;
  undefined1 *puVar2;
  int iVar3;
  int iVar4;
  int local_10;
  
  (**(code **)(*(int *)this + 0x20))(&local_10,this);
  if (local_10 != 0) {
    CSprite::Spawn((CSprite *)this);
    return;
  }
  puVar1 = *(undefined1 **)(this + 0x4b8);
  *(undefined1 **)(this + 0x260) = puVar1;
  CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
  puVar2 = &DAT_00d539c2;
  if (puVar1 != (undefined1 *)0x0) {
    puVar2 = puVar1;
  }
  iVar3 = (**(code **)(*soundemitterbase + 0x88))(soundemitterbase,puVar2);
  if (iVar3 != *(int *)(this + 0xf4)) {
    if (this[0x6c] == (CSpriteTrail)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CSpriteTrail)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xf4) = iVar3;
  }
  CSprite::Spawn((CSprite *)this);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
  CBaseEntity::SetMoveType((CBaseEntity *)this,8,0);
  CBaseEntity::SetCollisionBounds((CBaseEntity *)this,(Vector *)&vec3_origin,(Vector *)&vec3_origin)
  ;
  CSprite::TurnOn((CSprite *)this);
  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)