CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>::Insert
0x0081de80 · 491 bytes · __thiscall
_ZN10CUtlRBTreeIN12CSceneEntity17SpeakEventSound_tEtPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE6InsertES3_
Decompiled
undefined (2 params)
/* CUtlRBTree<CSceneEntity::SpeakEventSound_t, unsigned short, bool
(*)(CSceneEntity::SpeakEventSound_t const&, CSceneEntity::SpeakEventSound_t const&),
CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t, unsigned short>, unsigned short>
>::Insert(CSceneEntity::SpeakEventSound_t const&) */
ushort __thiscall
CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
*this,SpeakEventSound_t *param_1)
{
ushort uVar1;
bool bVar2;
char cVar3;
int iVar4;
undefined2 *puVar5;
int iVar6;
ushort uVar7;
int local_24;
ushort local_1e;
uVar1 = *(ushort *)(this + 0x10);
if (*(ushort *)(this + 0x10) == 0xffff) {
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x10;
puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar5[2] = 0xffff;
puVar5[1] = 0xffff;
*puVar5 = 0xffff;
puVar5[3] = 0;
}
else {
do {
uVar7 = uVar1;
iVar6 = (uint)uVar7 * 0x10;
cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar6 + 8);
if (cVar3 == '\0') {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f57f2e = 0xffff;
DAT_00f57f30 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar2 = false;
uVar1 = *(ushort *)(*(int *)(this + 4) + 2 + iVar6);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f57f2e = 0xffff;
DAT_00f57f30 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar2 = true;
uVar1 = *(ushort *)(*(int *)(this + 4) + iVar6);
}
} while (uVar1 != 0xffff);
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x10;
puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar5[1] = 0xffff;
*puVar5 = 0xffff;
puVar5[2] = uVar7;
puVar5[3] = 0;
if (uVar7 != 0xffff) {
if (bVar2) {
*(ushort *)(*(int *)(this + 4) + iVar6) = local_1e;
}
else {
*(ushort *)(*(int *)(this + 4) + 2 + iVar6) = local_1e;
}
goto LAB_0081df55;
}
}
*(ushort *)(this + 0x10) = local_1e;
LAB_0081df55:
InsertRebalance(this,local_1e);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -8) {
*(undefined2 *)(local_24 + 8) = *(undefined2 *)param_1;
*(undefined4 *)(local_24 + 0xc) = *(undefined4 *)(param_1 + 4);
}
return local_1e;
}
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.