L L4D2node

CGunTarget::Spawn

0x006d77f0 · 286 bytes · __thiscall

_ZN10CGunTarget5SpawnEv

Decompiled

undefined (1 param)

/* CGunTarget::Spawn() */

void __thiscall CGunTarget::Spawn(CGunTarget *this)

{
  code *pcVar1;
  int iVar2;
  undefined1 *puVar3;
  undefined1 *local_10;
  
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),1);
  CBaseEntity::SetMoveType((CBaseEntity *)this,7,0);
  pcVar1 = *(code **)(*(int *)this + 0x70);
  (**(code **)(*(int *)this + 0x20))(&local_10,this);
  puVar3 = &DAT_00d539c2;
  if (local_10 != (undefined1 *)0x0) {
    puVar3 = local_10;
  }
  (*pcVar1)(this,puVar3);
  if (*(float *)(this + 0x11c) == 0.0) {
    *(undefined4 *)(this + 0x11c) = 0x42c80000;
  }
  if (this[0x105] != (CGunTarget)0x0) {
    (**(code **)(*(int *)this + 0x224))(this,this + 0x105);
    this[0x105] = (CGunTarget)0x0;
  }
  CBaseEntity::AddFlag((CBaseEntity *)this,0x2000);
  iVar2 = *(int *)(this + 0x100);
  this[0x4b8] = (CGunTarget)0x0;
  if (iVar2 != *(int *)(this + 0xfc)) {
    (**(code **)(*(int *)this + 0x20c))(this,this + 0xfc);
    *(int *)(this + 0xfc) = iVar2;
  }
  if (((byte)this[0x148] & 1) != 0) {
    *(code **)(this + 0x14) = Start;
    *(undefined4 *)(this + 0x18) = 0;
    CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,0.3);
  }
                    /* WARNING: Could not recover jumptable at 0x006d78eb. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*(int *)this + 0x290))();
  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)