CEntityParticleTrail::Destroy
0x006802b0 · 212 bytes · __cdecl
_ZN20CEntityParticleTrail7DestroyEP11CBaseEntityRK25EntityParticleTrailInfo_t
Decompiled
undefined (2 params)
/* CEntityParticleTrail::Destroy(CBaseEntity*, EntityParticleTrailInfo_t const&) */
void CEntityParticleTrail::Destroy(CBaseEntity *param_1,EntityParticleTrailInfo_t *param_2)
{
uint uVar1;
int iVar2;
char *pcVar3;
int iVar4;
CEntityParticleTrail *this;
undefined *puVar5;
int iVar6;
pcVar3 = "";
if (*(char **)(param_2 + 4) != (char *)0x0) {
pcVar3 = *(char **)(param_2 + 4);
}
iVar4 = GetMaterialIndex(pcVar3);
uVar1 = *(uint *)(param_1 + 0x18c);
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
iVar2 = *(int *)(puVar5 + 4);
while (iVar2 != 0) {
uVar1 = *(uint *)(iVar2 + 400);
iVar6 = 0;
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
iVar6 = *(int *)(puVar5 + 4);
}
this = (CEntityParticleTrail *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&typeinfo,0);
iVar2 = iVar6;
if ((this != (CEntityParticleTrail *)0x0) && (iVar4 == *(int *)(this + 0x440))) {
DecrementRefCount(this);
}
}
}
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.