L L4D2node

CInferno::Spawn

0x008c6930 · 556 bytes · __thiscall

_ZN8CInferno5SpawnEv

Decompiled

undefined (1 param)

/* CInferno::Spawn() */

void __thiscall CInferno::Spawn(CInferno *this)

{
  CBaseEdict *pCVar1;
  int iVar2;
  longdouble lVar3;
  float fVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  undefined1 local_14 [8];
  
  if (*(int *)(this + 0xa40) != 0) {
    if (this[0x6c] == (CInferno)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CInferno)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0xa40) = 0;
  }
  *(undefined4 *)(this + 0xb48) = 0x41f00000;
  *(undefined4 *)(this + 0xb4c) = 0x42a00000;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + 2.0 != *(float *)(this + 0xb7c)) {
    (**(code **)(*(int *)(this + 0xb74) + 4))(this + 0xb74,this + 0xb7c);
    *(float *)(this + 0xb7c) = (float)lVar3 + 2.0;
  }
  if (*(float *)(this + 0xb78) != 2.0) {
    (**(code **)(*(int *)(this + 0xb74) + 4))(this + 0xb74,this + 0xb78);
    *(undefined4 *)(this + 0xb78) = 0x40000000;
  }
  uVar8 = 0;
  uVar7 = 0;
  uVar6 = 0;
  CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)InfernoThink);
  uVar5 = 0;
  fVar4 = *(float *)(gpGlobals + 0xc);
  CBaseEntity::SetNextThink((CBaseEntity *)this,fVar4,(char *)0x0);
  lVar3 = (longdouble)(**(code **)(*(int *)this + 0x340))(this,fVar4,uVar5,uVar6,uVar7,uVar8);
  fVar4 = (float)lVar3;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + fVar4 != *(float *)(this + 0xbb0)) {
    (**(code **)(*(int *)(this + 0xba8) + 4))(this + 0xba8,this + 0xbb0);
    *(float *)(this + 0xbb0) = (float)lVar3 + fVar4;
  }
  if (fVar4 != *(float *)(this + 0xbac)) {
    (**(code **)(*(int *)(this + 0xba8) + 4))(this + 0xba8,this + 0xbac);
    *(float *)(this + 0xbac) = fVar4;
  }
  if (*(int *)(this + 0xa44) == 0) {
    return;
  }
  if (this[0x6c] == (CInferno)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar2 + 2) = 0;
    }
    *(undefined4 *)(this + 0xa44) = 0;
  }
  else {
    this[0x70] = (CInferno)((byte)this[0x70] | 1);
    *(undefined4 *)(this + 0xa44) = 0;
  }
  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)