CMeleeWeaponInfoStore::DeleteAllInfo
0x00544a00 · 112 bytes · __thiscall
_ZN21CMeleeWeaponInfoStore13DeleteAllInfoEv
Decompiled
undefined (1 param)
/* CMeleeWeaponInfoStore::DeleteAllInfo() */
void __thiscall CMeleeWeaponInfoStore::DeleteAllInfo(CMeleeWeaponInfoStore *this)
{
CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
*this_00;
CMeleeWeaponInfo *this_01;
int iVar1;
this_00 = (CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
*)(this + 0xc);
for (iVar1 = CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::FirstInorder(this_00); iVar1 != -1;
iVar1 = CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::NextInorder(this_00,iVar1)) {
this_01 = *(CMeleeWeaponInfo **)(iVar1 * 0x18 + *(int *)(this + 0x10) + 0x14);
if (this_01 != (CMeleeWeaponInfo *)0x0) {
CMeleeWeaponInfo::~CMeleeWeaponInfo(this_01);
operator_delete(this_01);
}
}
CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::RemoveAll(this_00);
*(undefined4 *)(this + 0x3c) = 0;
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.