CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>::Unlink
0x005ae540 · 3418 bytes · __thiscall
_ZN10CUtlRBTreeIN14AI_CriteriaSet11CritEntry_tEsPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_sEsEE6UnlinkEs
Decompiled
undefined (2 params)
/* CUtlRBTree<AI_CriteriaSet::CritEntry_t, short, bool (*)(AI_CriteriaSet::CritEntry_t const&,
AI_CriteriaSet::CritEntry_t const&), CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,
short>, short> >::Unlink(short) */
void __thiscall
CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::Unlink(CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
*this,short param_1)
{
short sVar1;
char cVar2;
int iVar3;
short *psVar4;
short sVar5;
undefined2 *puVar6;
short sVar7;
uint uVar8;
bool bVar9;
int local_2c;
short local_26;
int local_20;
if (param_1 == -1) {
return;
}
if (Links(short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
local_2c = param_1 * 0x50;
psVar4 = (short *)(*(int *)(this + 4) + local_2c);
if (*psVar4 != -1) {
if (Links(short)::s_Sentinel != '\0') goto LAB_005ae72f;
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
sVar7 = *(short *)(*(int *)(this + 4) + local_2c + 2);
uVar8 = (uint)sVar7;
if (sVar7 != -1) {
cVar2 = Links(short)::s_Sentinel;
if (Links(short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
uVar8 = (uint)*(short *)(*(int *)(this + 4) + 2 + local_2c);
cVar2 = Links(short)::s_Sentinel;
}
goto LAB_005ae791;
}
}
LAB_005ae588:
uVar8 = (uint)(ushort)param_1;
local_20 = local_2c;
cVar2 = Links(short)::s_Sentinel;
if (Links(short)::s_Sentinel == '\0') goto LAB_005ae7c5;
LAB_005ae59a:
sVar7 = (short)uVar8;
if (sVar7 == -1) goto LAB_005ae7ea;
LAB_005ae5a4:
if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_005ae800;
LAB_005ae5b4:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar7 == -1) {
psVar4 = &Links(short)::s_Sentinel;
}
else {
psVar4 = (short *)(local_20 + *(int *)(this + 4));
}
local_26 = *psVar4;
}
else {
local_2c = param_1 * 0x50;
psVar4 = (short *)(local_2c + *(int *)(this + 4));
if (*psVar4 == -1) goto LAB_005ae588;
LAB_005ae72f:
uVar8 = (uint)psVar4[1];
cVar2 = Links(short)::s_Sentinel;
if (psVar4[1] == -1) goto LAB_005ae588;
LAB_005ae791:
while( true ) {
sVar7 = (short)uVar8;
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
sVar1 = Links(short)::s_Sentinel;
if (sVar7 != -1) {
sVar1 = *(short *)(sVar7 * 0x50 + *(int *)(this + 4));
}
if (sVar1 == -1) break;
if (cVar2 == '\0') {
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
cVar2 = Links(short)::s_Sentinel;
if (sVar7 != -1) goto LAB_005ae785;
LAB_005ae84d:
psVar4 = &Links(short)::s_Sentinel;
}
else {
if (sVar7 == -1) goto LAB_005ae84d;
LAB_005ae785:
psVar4 = (short *)(uVar8 * 0x50 + *(int *)(this + 4));
}
uVar8 = (uint)*psVar4;
}
local_20 = sVar7 * 0x50;
if (cVar2 != '\0') goto LAB_005ae59a;
LAB_005ae7c5:
sVar7 = (short)uVar8;
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
cVar2 = Links(short)::s_Sentinel;
if (sVar7 != -1) goto LAB_005ae5a4;
LAB_005ae7ea:
if (Links(short)::s_Sentinel != -1) goto LAB_005ae5b4;
LAB_005ae800:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar7 == -1) {
puVar6 = &Links(short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
local_26 = puVar6[1];
}
if (local_26 != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
puVar6 = &Links(short)::s_Sentinel;
if (sVar7 != -1) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(undefined2 *)(*(int *)(this + 4) + 4 + local_26 * 0x50) = puVar6[2];
}
if (sVar7 == *(short *)(this + 0x10)) {
*(short *)(this + 0x10) = local_26;
}
else {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar7 == -1) {
puVar6 = &Links(short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
sVar1 = puVar6[2];
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar1 == -1) {
psVar4 = &Links(short)::s_Sentinel;
}
else {
psVar4 = (short *)(sVar1 * 0x50 + *(int *)(this + 4));
}
if (sVar7 == *psVar4) {
if ((cVar2 == '\0') && (iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
puVar6 = &Links(short)::s_Sentinel;
if (sVar7 != -1) {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
*(short *)(*(int *)(this + 4) + (short)puVar6[2] * 0x50) = local_26;
cVar2 = Links(short)::s_Sentinel;
}
else {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
puVar6 = &Links(short)::s_Sentinel;
if (sVar7 != -1) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(short *)(*(int *)(this + 4) + 2 + (short)puVar6[2] * 0x50) = local_26;
}
}
if ((cVar2 == '\0') && (iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
sVar1 = DAT_00f21a9e;
if ((sVar7 != -1) && (sVar1 = *(short *)(*(int *)(this + 4) + 6 + local_20), sVar7 == param_1))
goto LAB_005ae6b6;
if (Links(short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
bVar9 = Links(short)::s_Sentinel != '\0';
*(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
if (bVar9) goto LAB_005ae88a;
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
bVar9 = Links(short)::s_Sentinel == '\0';
*(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 2 + local_2c);
if ((bVar9) && (iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
}
else {
*(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
LAB_005ae88a:
*(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 2 + local_2c);
}
*(undefined2 *)(*(int *)(this + 4) + local_20) = *(undefined2 *)(*(int *)(this + 4) + local_2c);
if (param_1 == *(short *)(this + 0x10)) {
*(short *)(this + 0x10) = sVar7;
cVar2 = Links(short)::s_Sentinel;
}
else {
if (Links(short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar3 != 0) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
sVar5 = *(short *)(*(int *)(this + 4) + 4 + local_2c);
if ((Links(short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
Links(short)::s_Sentinel = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
}
else {
sVar5 = *(short *)(*(int *)(this + 4) + 4 + local_2c);
}
if (sVar5 == -1) {
psVar4 = &Links(short)::s_Sentinel;
}
else {
psVar4 = (short *)(sVar5 * 0x50 + *(int *)(this + 4));
}
if (param_1 == *psVar4) {
if ((Links(short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
*(short *)(*(int *)(this + 4) + *(short *)(*(int *)(this + 4) + 4 + local_2c) * 0x50) = sVar7;
cVar2 = Links(short)::s_Sentinel;
}
else {
if ((Links(short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
cVar2 = Links(short)::s_Sentinel;
*(short *)(*(int *)(this + 4) + 2 + *(short *)(*(int *)(this + 4) + 4 + local_2c) * 0x50) =
sVar7;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar7 == -1) {
psVar4 = &Links(short)::s_Sentinel;
}
else {
psVar4 = (short *)(local_20 + *(int *)(this + 4));
}
if (*psVar4 != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
psVar4 = &Links(short)::s_Sentinel;
if (sVar7 != -1) {
psVar4 = (short *)(*(int *)(this + 4) + local_20);
}
*(short *)(*(int *)(this + 4) + 4 + *psVar4 * 0x50) = sVar7;
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
if (sVar7 == -1) {
puVar6 = &Links(short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
if (puVar6[1] != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), cVar2 = Links(short)::s_Sentinel,
iVar3 != 0)) {
DAT_00f21a9a = 0xffff;
Links(short)::s_Sentinel = -1;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
cVar2 = Links(short)::s_Sentinel;
}
puVar6 = &Links(short)::s_Sentinel;
if (sVar7 != -1) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(short *)(*(int *)(this + 4) + 4 + (short)puVar6[1] * 0x50) = sVar7;
}
if ((cVar2 == '\0') && (iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar3 != 0)) {
Links(short)::s_Sentinel = -1;
DAT_00f21a9a = 0xffff;
DAT_00f21a9c = 0xffff;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
*(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 6 + local_2c);
LAB_005ae6b6:
if ((local_26 != -1) && (sVar1 == 1)) {
RemoveRebalance(this,local_26);
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.