CMeleeWeaponInfoStore::DumpWeapons
0x00544030 · 193 bytes · __thiscall
_ZN21CMeleeWeaponInfoStore11DumpWeaponsEv
Decompiled
undefined (1 param)
/* CMeleeWeaponInfoStore::DumpWeapons() */
void __thiscall CMeleeWeaponInfoStore::DumpWeapons(CMeleeWeaponInfoStore *this)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = 0;
iVar3 = 0;
if (*(int *)(this + 0x14) < 1) {
return;
}
do {
while (*(int *)(this + 0x28) < iVar3) {
LAB_00544050:
iVar3 = iVar3 + 1;
iVar5 = iVar5 + 0x18;
if (*(int *)(this + 0x14) <= iVar3) {
return;
}
}
if ((CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar1 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel), iVar1 != 0)) {
CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1dde0 = 0xffffffff;
DAT_00f1dde4 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::Links(int)::s_Sentinel);
}
if (*(int *)(*(int *)(this + 0x10) + iVar5) == iVar3) goto LAB_00544050;
iVar2 = *(int *)(this + 0x10) + iVar5;
iVar1 = *(int *)(iVar2 + 0x14);
if (iVar1 == 0) goto LAB_00544050;
iVar5 = iVar5 + 0x18;
iVar4 = iVar3 + 1;
Msg("(%s)%d: %s (hash=%d) (%x)\n","Server",iVar3,iVar1 + 0xc50,*(undefined4 *)(iVar2 + 0x10),
iVar1);
iVar3 = iVar4;
if (*(int *)(this + 0x14) <= iVar4) {
return;
}
} while( true );
}
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.