DetachAttachedRagdollsForEntity
0x0079ab10 · 142 bytes · __cdecl
_Z31DetachAttachedRagdollsForEntityP11CBaseEntity
Decompiled
undefined (1 param)
/* DetachAttachedRagdollsForEntity(CBaseEntity*) */
void DetachAttachedRagdollsForEntity(CBaseEntity *param_1)
{
undefined4 *puVar1;
int iVar2;
int iVar3;
int local_30 [8];
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 0079ab49 to 0079ab4d has its CatchHandler @ 0079ab9e */
GetAllChildren(param_1,(CUtlVector *)local_30);
iVar2 = local_30[3] + -1;
iVar3 = iVar2 * 4;
if (-1 < iVar2) {
do {
iVar2 = iVar2 + -1;
puVar1 = (undefined4 *)(local_30[0] + iVar3);
iVar3 = iVar3 + -4;
DetachAttachedRagdoll((CBaseEntity *)*puVar1);
} while (iVar2 != -1);
}
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.