CBaseEntity::~CBaseEntity
0x00617610 · 572 bytes · __thiscall
_ZN11CBaseEntityD2Ev
Decompiled
undefined (1 param)
/* CBaseEntity::~CBaseEntity() */
void __thiscall CBaseEntity::~CBaseEntity(CBaseEntity *this)
{
int iVar1;
int *piVar2;
int *__ptr;
int iVar3;
CBaseEntity *in_stack_ffffffc8;
CBaseEntity *pCVar4;
undefined4 local_20 [4];
*(undefined ***)this = &PTR__CBaseEntity_00c60288;
PhysCleanupFrictionSounds(this);
VPhysicsDestroyObject(this);
pCVar4 = *(CBaseEntity **)(this + 0x3f4);
if (pCVar4 != (CBaseEntity *)0x0) {
(**(code **)(*g_pScriptVM + 100))(g_pScriptVM);
*(undefined4 *)(this + 0x3f4) = 0;
in_stack_ffffffc8 = pCVar4;
}
g_bDisableEhandleAccess = 0;
PhysicsRemoveTouchedList(this);
PhysicsRemoveGroundList(this,in_stack_ffffffc8);
DestroyAllDataObjects(this);
local_20[0] = *(undefined4 *)(this + 0x3b4);
g_bDisableEhandleAccess = 1;
CBaseEntityList::RemoveEntity((CBaseEntityList *)gEntList,local_20);
piVar2 = g_pScriptVM;
if (*(int *)(this + 1000) != -1) {
__ptr = *(int **)(this + 0x3f0);
if ((g_pScriptVM != (int *)0x0) && (0 < *__ptr)) {
iVar3 = 0;
do {
(**(code **)(*piVar2 + 0x4c))(piVar2,*(undefined4 *)__ptr[iVar3 + 1]);
iVar1 = iVar3 * 4;
iVar3 = iVar3 + 1;
**(undefined4 **)(*(int *)(this + 0x3f0) + 4 + iVar1) = 0xffffffff;
__ptr = *(int **)(this + 0x3f0);
} while (iVar3 < *__ptr);
}
if (__ptr != &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData) {
free(__ptr);
*(undefined4 **)(this + 0x3f0) =
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
}
if (((*(int *)(this + 1000) != 0) && (piVar2 != (int *)0x0)) && (((byte)this[0x3ec] & 1) == 0))
{
(**(code **)(*piVar2 + 0x44))(piVar2,*(int *)(this + 1000));
}
*(undefined4 *)(this + 1000) = 0xffffffff;
}
*(undefined4 *)(this + 0x3ec) = 0;
if (*(undefined4 **)(this + 0x3f0) !=
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::StaticData()::
staticData) {
free(*(undefined4 **)(this + 0x3f0));
*(undefined4 **)(this + 0x3f0) =
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
}
CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x364));
CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x34c));
CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x334));
CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x31c));
CBaseEntityOutput::~CBaseEntityOutput((CBaseEntityOutput *)(this + 0x304));
*(undefined ***)(this + 0x194) = &PTR_GetEntityHandle_00c5fea8;
CCollisionProperty::~CCollisionProperty((CCollisionProperty *)(this + 0x194));
CUtlLinkedList<CDamageModifier*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageModifier*,int>,int>>
::RemoveAll((CUtlLinkedList<CDamageModifier*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageModifier*,int>,int>>
*)(this + 0x158));
CUtlMemory<UtlLinkedListElem_t<CDamageModifier*,int>,int>::Purge
((CUtlMemory<UtlLinkedListElem_t<CDamageModifier*,int>,int> *)(this + 0x158));
*(undefined4 *)(this + 0xc4) = 0;
CUtlMemory<ResponseContext_t,int>::Purge((CUtlMemory<ResponseContext_t,int> *)(this + 0xb8));
*(undefined4 *)(this + 200) = *(undefined4 *)(this + 0xb8);
CUtlMemory<ResponseContext_t,int>::Purge((CUtlMemory<ResponseContext_t,int> *)(this + 0xb8));
*(undefined4 *)(this + 0xb0) = 0;
CUtlMemory<thinkfunc_t,int>::Purge((CUtlMemory<thinkfunc_t,int> *)(this + 0xa4));
*(undefined4 *)(this + 0xb4) = *(undefined4 *)(this + 0xa4);
CUtlMemory<thinkfunc_t,int>::Purge((CUtlMemory<thinkfunc_t,int> *)(this + 0xa4));
CServerNetworkProperty::~CServerNetworkProperty((CServerNetworkProperty *)(this + 0x24));
*(undefined ***)this = &PTR__IHandleEntity_00c5fdf8;
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.