CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>::Insert
0x00547590 · 460 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIiP16CMeleeWeaponInfoiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE6InsertERKS4_
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<int, CMeleeWeaponInfo*, int>::Node_t, int, CUtlMap<int, CMeleeWeaponInfo*,
int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<int, CMeleeWeaponInfo*, int>::Node_t, int>,
int> >::Insert(CUtlMap<int, CMeleeWeaponInfo*, int>::Node_t const&) */
int __thiscall
CUtlRBTree<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int,CUtlMap<int,CMeleeWeaponInfo*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CMeleeWeaponInfo*,int>::Node_t,int>,int>>
::Insert(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,Node_t *param_1)
{
int iVar1;
bool bVar2;
char cVar3;
int iVar4;
undefined4 *puVar5;
int iVar6;
int local_24;
iVar4 = *(int *)(this + 0x10);
if (*(int *)(this + 0x10) == -1) {
iVar4 = NewNode(this);
local_24 = iVar4 * 0x18;
puVar5 = (undefined4 *)(local_24 + *(int *)(this + 4));
puVar5[2] = 0xffffffff;
puVar5[1] = 0xffffffff;
*puVar5 = 0xffffffff;
puVar5[3] = 0;
}
else {
do {
iVar6 = iVar4;
iVar1 = iVar6 * 0x18;
cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 0x10);
if (cVar3 == '\0') {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1dde0 = 0xffffffff;
DAT_00f1dde4 = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
bVar2 = false;
iVar4 = *(int *)(*(int *)(this + 4) + 4 + iVar1);
}
else {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1dde0 = 0xffffffff;
DAT_00f1dde4 = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
iVar4 = *(int *)(*(int *)(this + 4) + iVar6 * 0x18);
bVar2 = true;
}
} while (iVar4 != -1);
iVar4 = NewNode(this);
local_24 = iVar4 * 0x18;
puVar5 = (undefined4 *)(local_24 + *(int *)(this + 4));
puVar5[2] = iVar6;
puVar5[1] = 0xffffffff;
*puVar5 = 0xffffffff;
puVar5[3] = 0;
if (iVar6 != -1) {
if (bVar2) {
*(int *)(*(int *)(this + 4) + iVar1) = iVar4;
}
else {
*(int *)(*(int *)(this + 4) + 4 + iVar1) = iVar4;
}
goto LAB_0054765d;
}
}
*(int *)(this + 0x10) = iVar4;
LAB_0054765d:
InsertRebalance(this,iVar4);
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -0x10) {
*(undefined4 *)(local_24 + 0x10) = *(undefined4 *)param_1;
*(undefined4 *)(local_24 + 0x14) = *(undefined4 *)(param_1 + 4);
}
return iVar4;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.