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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.