CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>::Unlink
0x004023f0 · 3397 bytes · __thiscall
_ZN10CUtlRBTreeIN19CCombatCharVisCache15VisCacheEntry_tEtNS0_18CVisCacheEntryLessE10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE6UnlinkEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t, unsigned short,
CCombatCharVisCache::CVisCacheEntryLess,
CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t, unsigned short>, unsigned short>
>::Unlink(unsigned short) */
void __thiscall
CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
short sVar1;
char cVar2;
int iVar3;
ushort uVar4;
ushort *puVar5;
undefined2 *puVar6;
ushort uVar7;
short sVar8;
uint uVar9;
short *psVar10;
bool bVar11;
int local_2c;
ushort local_26;
int local_20;
if (param_1 == 0xffff) {
return;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
local_2c = (uint)param_1 * 0x18;
psVar10 = (short *)(*(int *)(this + 4) + local_2c);
if (*psVar10 != -1) {
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004025cf;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar7 = *(ushort *)(*(int *)(this + 4) + local_2c + 2);
uVar9 = (uint)uVar7;
if (uVar7 != 0xffff) {
cVar2 = Links(unsigned_short)::s_Sentinel;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar9 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_2c);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
goto LAB_00402631;
}
}
LAB_00402438:
uVar9 = (uint)param_1;
local_20 = local_2c;
cVar2 = Links(unsigned_short)::s_Sentinel;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00402668;
LAB_0040244a:
uVar7 = (ushort)uVar9;
if (uVar7 == 0xffff) goto LAB_0040268d;
LAB_00402454:
if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_004026a0;
LAB_00402464:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar7 == 0xffff) {
puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar5 = (ushort *)(local_20 + *(int *)(this + 4));
}
local_26 = *puVar5;
}
else {
local_2c = (uint)param_1 * 0x18;
psVar10 = (short *)(local_2c + *(int *)(this + 4));
if (*psVar10 == -1) goto LAB_00402438;
LAB_004025cf:
uVar9 = (uint)(ushort)psVar10[1];
cVar2 = Links(unsigned_short)::s_Sentinel;
if (psVar10[1] == 0xffff) goto LAB_00402438;
LAB_00402631:
while( true ) {
sVar8 = (short)uVar9;
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
sVar1 = Links(unsigned_short)::s_Sentinel;
if (sVar8 != -1) {
sVar1 = *(short *)(*(int *)(this + 4) + uVar9 * 0x18);
}
if (sVar1 == -1) break;
if (cVar2 == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (sVar8 != -1) goto LAB_00402625;
LAB_004026ed:
puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
if (sVar8 == -1) goto LAB_004026ed;
LAB_00402625:
puVar5 = (ushort *)(*(int *)(this + 4) + uVar9 * 0x18);
}
uVar9 = (uint)*puVar5;
}
local_20 = uVar9 * 0x18;
if (cVar2 != '\0') goto LAB_0040244a;
LAB_00402668:
uVar7 = (ushort)uVar9;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) goto LAB_00402454;
LAB_0040268d:
if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_00402464;
LAB_004026a0:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar7 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
local_26 = puVar6[1];
}
if (local_26 != 0xffff) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar6 = &Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(undefined2 *)(*(int *)(this + 4) + 4 + (uint)local_26 * 0x18) = puVar6[2];
}
if (uVar7 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = local_26;
}
else {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar7 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
uVar4 = puVar6[2];
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar4 == 0xffff) {
puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
}
if (uVar7 == *puVar5) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
puVar6 = &Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
*(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar6[2] * 0x18) = local_26;
cVar2 = Links(unsigned_short)::s_Sentinel;
}
else {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar6 = &Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar6[2] * 0x18) = local_26;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar8 = DAT_00f13996;
if ((uVar7 != 0xffff) && (sVar8 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar7 == param_1)
) goto LAB_00402560;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar11 = Links(unsigned_short)::s_Sentinel != '\0';
*(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
if (bVar11) goto LAB_0040272a;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar11 = Links(unsigned_short)::s_Sentinel == '\0';
*(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 2 + local_2c);
if ((bVar11) && (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
}
else {
*(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
LAB_0040272a:
*(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 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = uVar7;
cVar2 = Links(unsigned_short)::s_Sentinel;
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_2c);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
}
else {
uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_2c);
}
if (uVar4 == 0xffff) {
puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
}
if (param_1 == *puVar5) {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x18)
= uVar7;
cVar2 = Links(unsigned_short)::s_Sentinel;
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
*(ushort *)
(*(int *)(this + 4) + 2 + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x18) =
uVar7;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar7 == 0xffff) {
psVar10 = &Links(unsigned_short)::s_Sentinel;
}
else {
psVar10 = (short *)(local_20 + *(int *)(this + 4));
}
if (*psVar10 != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) {
puVar5 = (ushort *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar5 * 0x18) = uVar7;
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar7 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
if (puVar6[1] != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f13992 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar6 = &Links(unsigned_short)::s_Sentinel;
if (uVar7 != 0xffff) {
puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar6[1] * 0x18) = uVar7;
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f13992 = 0xffff;
DAT_00f13994 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 6 + local_2c);
LAB_00402560:
if ((local_26 != 0xffff) && (sVar8 == 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.