L L4D2node

CFlexExpresser::Spawn

0x008cff90 · 461 bytes · __thiscall

_ZN14CFlexExpresser5SpawnEv

Decompiled

undefined (1 param)

/* CFlexExpresser::Spawn() */

void __thiscall CFlexExpresser::Spawn(CFlexExpresser *this)

{
  CBaseEdict *this_00;
  int iVar1;
  char *pcVar2;
  char *local_10;
  
  (**(code **)(*(int *)this + 0x20))(&local_10,this);
  pcVar2 = "";
  if (local_10 != (char *)0x0) {
    pcVar2 = local_10;
  }
  if (*pcVar2 != '\0') {
    CBaseEntity::PrecacheModel(pcVar2);
    (**(code **)(*(int *)this + 0x70))(this,pcVar2);
  }
  (**(code **)(*(int *)this + 0x6c))(this);
  if (((byte)this[0x148] & 1) == 0) {
    CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),2);
    CCollisionProperty::SetSolidFlags
              ((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 0x10));
  }
  else {
    CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
  }
  CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
  if (this[0x105] != (CFlexExpresser)0x0) {
    (**(code **)(*(int *)this + 0x224))(this,this + 0x105);
    this[0x105] = (CFlexExpresser)0x0;
  }
  if (*(int *)(this + 0x100) != 80000) {
    (**(code **)(*(int *)this + 0x214))(this,this + 0x100);
    *(undefined4 *)(this + 0x100) = 80000;
  }
  if (*(float *)(this + 0x468) != 1.0) {
    if (this[0x6c] == (CFlexExpresser)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar1 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar1 + 2) = 0;
      }
      *(undefined4 *)(this + 0x468) = 0x3f800000;
    }
    else {
      this[0x70] = (CFlexExpresser)((byte)this[0x70] | 1);
      *(undefined4 *)(this + 0x468) = 0x3f800000;
    }
  }
  *(undefined4 *)(this + 0x440) = 0;
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
  CBaseAnimating::ResetSequenceInfo((CBaseAnimating *)this);
  (**(code **)(*(int *)this + 0x374))(this);
  CreateExpresser(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)