CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Unlink
0x00485fa0 · 3422 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIP11CBaseEntityPN28CPhysSaveRestoreBlockHandler17CEntityRestoreSetEtE6Node_tEtNS6_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS7_tEtEE6UnlinkEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<CBaseEntity*, CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned
short>::Node_t, unsigned short, CUtlMap<CBaseEntity*,
CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,
CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned short>::Node_t, unsigned short>,
unsigned short> >::Unlink(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
short sVar1;
char cVar2;
int iVar3;
ushort uVar4;
short *psVar5;
ushort *puVar6;
undefined2 *puVar7;
ushort uVar8;
short sVar9;
uint uVar10;
bool bVar11;
ushort local_2a;
int local_24;
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) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
local_24 = (uint)param_1 * 0x10;
psVar5 = (short *)(local_24 + *(int *)(this + 4));
if (*psVar5 != -1) {
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0048618e;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar8 = *(ushort *)(local_24 + *(int *)(this + 4) + 2);
if (uVar8 != 0xffff) {
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004861a0;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 == 0) {
uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_24);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
else {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_24);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
goto LAB_004861d8;
}
}
LAB_00485ff0:
uVar10 = (uint)param_1;
local_20 = local_24;
cVar2 = Links(unsigned_short)::s_Sentinel;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00486225;
LAB_00486002:
uVar8 = (ushort)uVar10;
if (uVar8 == 0xffff) goto LAB_0048624a;
LAB_0048600c:
if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_00486260;
LAB_0048601c:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar8 == 0xffff) {
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (ushort *)(local_20 + *(int *)(this + 4));
}
local_2a = *puVar6;
}
else {
local_24 = (uint)param_1 * 0x10;
psVar5 = (short *)(local_24 + *(int *)(this + 4));
if (*psVar5 == -1) goto LAB_00485ff0;
LAB_0048618e:
uVar8 = psVar5[1];
if (uVar8 == 0xffff) goto LAB_00485ff0;
LAB_004861a0:
uVar10 = (uint)uVar8;
cVar2 = Links(unsigned_short)::s_Sentinel;
LAB_004861d8:
while( true ) {
sVar9 = (short)uVar10;
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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
sVar1 = Links(unsigned_short)::s_Sentinel;
if (sVar9 != -1) {
sVar1 = *(short *)(uVar10 * 0x10 + *(int *)(this + 4));
}
if (sVar1 == -1) break;
if (cVar2 == '\0') {
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (sVar9 != -1) goto LAB_004861cf;
LAB_00486475:
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
if (sVar9 == -1) goto LAB_00486475;
LAB_004861cf:
puVar6 = (ushort *)(uVar10 * 0x10 + *(int *)(this + 4));
}
uVar10 = (uint)*puVar6;
}
local_20 = uVar10 << 4;
if (cVar2 != '\0') goto LAB_00486002;
LAB_00486225:
uVar8 = (ushort)uVar10;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) goto LAB_0048600c;
LAB_0048624a:
if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_0048601c;
LAB_00486260:
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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar8 == 0xffff) {
puVar7 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
local_2a = puVar7[1];
}
if (local_2a != 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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar7 = &Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) {
puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(undefined2 *)(*(int *)(this + 4) + 4 + (uint)local_2a * 0x10) = puVar7[2];
}
if (uVar8 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = local_2a;
}
else {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar8 == 0xffff) {
puVar7 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
uVar4 = puVar7[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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar4 == 0xffff) {
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (ushort *)((uint)uVar4 * 0x10 + *(int *)(this + 4));
}
if (uVar8 == *puVar6) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
puVar7 = &Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) {
puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
*(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar7[2] * 0x10) = local_2a;
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_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar7 = &Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) {
puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar7[2] * 0x10) = local_2a;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar9 = DAT_00f165f4;
if ((uVar8 != 0xffff) && (sVar9 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar8 == param_1)
) goto LAB_00486115;
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_00f165f0 = 0xffff;
DAT_00f165f2 = 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_24);
if (bVar11) goto LAB_004862b2;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 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_24);
if ((bVar11) && (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
}
else {
*(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 4 + local_24);
LAB_004862b2:
*(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 2 + local_24);
}
*(undefined2 *)(*(int *)(this + 4) + local_20) = *(undefined2 *)(*(int *)(this + 4) + local_24);
if (param_1 == *(ushort *)(this + 0x10)) {
*(ushort *)(this + 0x10) = uVar8;
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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_24);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
}
else {
uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_24);
}
if (uVar4 == 0xffff) {
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
puVar6 = (ushort *)((uint)uVar4 * 0x10 + *(int *)(this + 4));
}
if (param_1 == *puVar6) {
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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_24) * 0x10)
= uVar8;
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_00f165f0 = 0xffff;
DAT_00f165f2 = 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_24) * 0x10) =
uVar8;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar8 == 0xffff) {
psVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
psVar5 = (short *)(local_20 + *(int *)(this + 4));
}
if (*psVar5 != -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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) {
puVar6 = (ushort *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar6 * 0x10) = uVar8;
}
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_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
if (uVar8 == 0xffff) {
puVar7 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
}
if (puVar7[1] != -1) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f165f0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
cVar2 = Links(unsigned_short)::s_Sentinel;
}
puVar7 = &Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) {
puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
}
*(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar7[1] * 0x10) = uVar8;
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165f0 = 0xffff;
DAT_00f165f2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 6 + local_24);
LAB_00486115:
if ((local_2a != 0xffff) && (sVar9 == 1)) {
RemoveRebalance(this,local_2a);
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.