CUtlRBTree<CHandle<CBaseEntity>,unsigned_short,bool(*)(CHandle<CBaseEntity>const&,CHandle<CBaseEntity>const&),CUtlMemory<UtlRBTreeNode_t<CHandle<CBaseEntity>,unsigned_short>,unsigned_short>>::Unlink
0x007d2db0 · 1427 bytes · __thiscall
_ZN10CUtlRBTreeI7CHandleI11CBaseEntityEtPFbRKS2_S4_E10CUtlMemoryI15UtlRBTreeNode_tIS2_tEtEE6UnlinkEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CHandle<CBaseEntity>, unsigned short, bool (*)(CHandle<CBaseEntity> const&,
CHandle<CBaseEntity> const&), CUtlMemory<UtlRBTreeNode_t<CHandle<CBaseEntity>, unsigned short>,
unsigned short> >::Unlink(unsigned short) */
void __thiscall
CUtlRBTree<CHandle<CBaseEntity>,unsigned_short,bool(*)(CHandle<CBaseEntity>const&,CHandle<CBaseEntity>const&),CUtlMemory<UtlRBTreeNode_t<CHandle<CBaseEntity>,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CHandle<CBaseEntity>,unsigned_short,bool(*)(CHandle<CBaseEntity>const&,CHandle<CBaseEntity>const&),CUtlMemory<UtlRBTreeNode_t<CHandle<CBaseEntity>,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
ushort uVar1;
short sVar2;
char cVar3;
int iVar4;
int iVar5;
short *psVar6;
ushort *puVar7;
undefined2 *puVar8;
ushort local_22;
if (param_1 != 0xffff) {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
iVar4 = (uint)param_1 * 0xc;
uVar1 = param_1;
cVar3 = Links(unsigned_short)::s_Sentinel;
if ((*(short *)(*(int *)(this + 4) + iVar4) != -1) &&
(iVar5 = Links(this,param_1), cVar3 = Links(unsigned_short)::s_Sentinel,
*(short *)(iVar5 + 2) != -1)) {
iVar4 = Links(this,param_1);
uVar1 = *(ushort *)(iVar4 + 2);
cVar3 = Links(unsigned_short)::s_Sentinel;
while( true ) {
if ((cVar3 == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar3 = Links(unsigned_short)::s_Sentinel, iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar3 = Links(unsigned_short)::s_Sentinel;
}
sVar2 = Links(unsigned_short)::s_Sentinel;
if (uVar1 != 0xffff) {
sVar2 = *(short *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
if (sVar2 == -1) break;
if (cVar3 == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar3 = Links(unsigned_short)::s_Sentinel;
if (uVar1 == 0xffff) goto LAB_007d3095;
LAB_007d2e52:
puVar7 = (ushort *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
else {
if (uVar1 != 0xffff) goto LAB_007d2e52;
LAB_007d3095:
puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
uVar1 = *puVar7;
}
iVar4 = (uint)uVar1 * 0xc;
}
if ((cVar3 == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
psVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
psVar6 = (short *)(iVar4 + *(int *)(this + 4));
}
if (*psVar6 == -1) {
iVar5 = Links(this,uVar1);
local_22 = *(ushort *)(iVar5 + 2);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar7 = (ushort *)(iVar4 + *(int *)(this + 4));
}
local_22 = *puVar7;
}
if (local_22 != 0xffff) {
iVar5 = Links(this,uVar1);
*(undefined2 *)(*(int *)(this + 4) + (uint)local_22 * 0xc + 4) = *(undefined2 *)(iVar5 + 4);
}
if (uVar1 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = local_22;
}
else {
iVar5 = Links(this,uVar1);
puVar7 = (ushort *)Links(this,*(ushort *)(iVar5 + 4));
if (uVar1 == *puVar7) {
iVar5 = Links(this,uVar1);
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(iVar5 + 4) * 0xc) = local_22;
}
else {
iVar5 = Links(this,uVar1);
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(iVar5 + 4) * 0xc + 2) = local_22;
}
}
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f4ee6a = 0xffff;
DAT_00f4ee6c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar2 = DAT_00f4ee6e;
if ((uVar1 == 0xffff) || (sVar2 = *(short *)(*(int *)(this + 4) + 6 + iVar4), uVar1 != param_1))
{
iVar5 = Links(this,param_1);
*(undefined2 *)(*(int *)(this + 4) + 4 + iVar4) = *(undefined2 *)(iVar5 + 4);
iVar5 = Links(this,param_1);
*(undefined2 *)(*(int *)(this + 4) + 2 + iVar4) = *(undefined2 *)(iVar5 + 2);
puVar8 = (undefined2 *)Links(this,param_1);
*(undefined2 *)(*(int *)(this + 4) + iVar4) = *puVar8;
if (param_1 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = uVar1;
}
else {
iVar5 = Links(this,param_1);
puVar7 = (ushort *)Links(this,*(ushort *)(iVar5 + 4));
if (param_1 == *puVar7) {
iVar5 = Links(this,param_1);
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(iVar5 + 4) * 0xc) = uVar1;
}
else {
iVar5 = Links(this,param_1);
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(iVar5 + 4) * 0xc + 2) = uVar1;
}
}
psVar6 = (short *)Links(this,uVar1);
if (*psVar6 != -1) {
puVar7 = (ushort *)Links(this,uVar1);
*(ushort *)(*(int *)(this + 4) + (uint)*puVar7 * 0xc + 4) = uVar1;
}
iVar5 = Links(this,uVar1);
if (*(short *)(iVar5 + 2) != -1) {
iVar5 = Links(this,uVar1);
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(iVar5 + 2) * 0xc + 4) = uVar1;
}
iVar5 = Links(this,param_1);
*(undefined2 *)(*(int *)(this + 4) + 6 + iVar4) = *(undefined2 *)(iVar5 + 6);
}
if ((local_22 != 0xffff) && (sVar2 == 1)) {
RemoveRebalance(this,local_22);
return;
}
}
return;
}
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.