CSimThinkManager::OnEntityDeleted
0x0067e950 · 175 bytes · __thiscall
_ZN16CSimThinkManager15OnEntityDeletedEP11CBaseEntity
Decompiled
undefined (2 params)
/* CSimThinkManager::OnEntityDeleted(CBaseEntity*) */
void __thiscall CSimThinkManager::OnEntityDeleted(CSimThinkManager *this,CBaseEntity *param_1)
{
undefined4 *puVar1;
undefined4 *puVar2;
ushort uVar3;
uint *puVar4;
uint uVar5;
uint uVar6;
uint uVar7;
puVar4 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar5 = *puVar4 & 0xfff;
uVar3 = *(ushort *)(this + uVar5 * 2 + 4);
uVar6 = (uint)uVar3;
if (uVar6 != 0xffff) {
if (*(int *)(this + 0x2010) < 1) {
*(undefined2 *)(this + uVar5 * 2 + 4) = 0xffff;
return;
}
uVar7 = *(int *)(this + 0x2010) - 1;
if (uVar6 != uVar7) {
puVar1 = (undefined4 *)(*(int *)(this + 0x2004) + uVar6 * 8);
puVar2 = (undefined4 *)(*(int *)(this + 0x2004) + uVar7 * 8);
*puVar1 = *puVar2;
puVar1[1] = puVar2[1];
uVar7 = *(int *)(this + 0x2010) - 1;
}
*(uint *)(this + 0x2010) = uVar7;
*(undefined2 *)(this + uVar5 * 2 + 4) = 0xffff;
if ((int)uVar6 < (int)uVar7) {
*(ushort *)(this + (uint)*(ushort *)(*(int *)(this + 0x2004) + uVar6 * 8) * 2 + 4) = uVar3;
}
}
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.