CMeleeWeaponInfoStore::Precache
0x00543f80 · 149 bytes · __thiscall
_ZN21CMeleeWeaponInfoStore8PrecacheEv
Decompiled
undefined (1 param)
/* CMeleeWeaponInfoStore::Precache() */
void __thiscall CMeleeWeaponInfoStore::Precache(CMeleeWeaponInfoStore *this)
{
undefined4 *puVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = 0;
iVar3 = 0;
if (*(int *)(this + 0x14) < 1) {
return;
}
do {
while (*(int *)(this + 0x28) < iVar3) {
LAB_00543fa0:
iVar3 = iVar3 + 1;
iVar4 = iVar4 + 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') &&
(iVar2 = __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), iVar2 != 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) + iVar4) == iVar3) goto LAB_00543fa0;
puVar1 = (undefined4 *)(*(int *)(this + 0x10) + 0x14 + iVar4);
iVar3 = iVar3 + 1;
iVar4 = iVar4 + 0x18;
CMeleeWeaponInfo::Precache((CMeleeWeaponInfo *)*puVar1);
if (*(int *)(this + 0x14) <= iVar3) {
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.