L L4D2node

CInfectedZooMaker::PerformSpawn

0x008d22b0 · 185 bytes · __thiscall

_ZN17CInfectedZooMaker12PerformSpawnEv

Decompiled

undefined (1 param)

/* CInfectedZooMaker::PerformSpawn() */

void __thiscall CInfectedZooMaker::PerformSpawn(CInfectedZooMaker *this)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  undefined1 local_34 [18];
  undefined2 local_22;
  int local_20 [4];
  
  uVar8 = 0;
  uVar7 = 0;
  iVar5 = 0;
  piVar6 = (int *)0x0;
  CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)0x0);
  local_20[0] = 0;
  if (*(short *)(this + 0x466) == 0) {
    iVar3 = 0;
  }
  else {
    iVar3 = 0;
    iVar2 = 0;
    do {
      local_22 = (undefined2)iVar2;
      pcVar1 = (char *)CUtlSymbolTable::String
                                 ((CUtlSymbolTable *)(this + 0x454),&local_22,iVar5,piVar6,uVar7,
                                  uVar8);
      piVar6 = local_20;
      iVar4 = iVar2 + 1;
      iVar5 = iVar2;
      iVar2 = PerformSpawnModel(this,pcVar1,iVar2,piVar6);
      iVar3 = iVar3 + iVar2;
      iVar2 = iVar4;
    } while (iVar4 < (int)(uint)*(ushort *)(this + 0x466));
  }
  Msg("[Zoo] spawned a total of %d different infected.\n",iVar3);
  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)