L L4D2node

DestroyAttractGoal

0x00a2cca0 · 184 bytes · __cdecl

_Z18DestroyAttractGoalP8Infected

Decompiled

undefined (1 param)

/* DestroyAttractGoal(Infected*) */

void DestroyAttractGoal(Infected *param_1)

{
  int iVar1;
  undefined1 *local_34;
  int local_30 [8];
  
  iVar1 = CBaseEntity::GetGender((CBaseEntity *)param_1);
  if (iVar1 != 0x10) {
    iVar1 = CBaseEntity::GetGender((CBaseEntity *)param_1);
    if (iVar1 != 0x11) {
      return;
    }
  }
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
                    /* try { // try from 00a2ccfd to 00a2cd2c has its CatchHandler @ 00a2cd5a */
  GetAllChildren((CBaseEntity *)param_1,(CUtlVector *)local_30);
  if (0 < local_30[3]) {
    iVar1 = 0;
    do {
      UTIL_Remove(*(CBaseEntity **)(local_30[0] + iVar1 * 4));
      local_34 = &DAT_00d539c2;
      ForEachSurvivor<ChangeSurvivorZombatMusicSuffix>((ChangeSurvivorZombatMusicSuffix *)&local_34)
      ;
      iVar1 = iVar1 + 1;
    } while (iVar1 < local_30[3]);
  }
  local_30[3] = 0;
  CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
  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)