CDirector::PlayerAvatarResetAll
0x00885390 · 388 bytes · __thiscall
_ZN9CDirector20PlayerAvatarResetAllEv
Decompiled
undefined (1 param)
/* CDirector::PlayerAvatarResetAll() */
void __thiscall CDirector::PlayerAvatarResetAll(CDirector *this)
{
ushort uVar1;
int iVar2;
short *psVar3;
ushort *puVar4;
uint uVar5;
uVar1 = *(ushort *)(this + 300);
do {
uVar5 = (uint)uVar1;
if (CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_008853b8;
CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_008853c2;
LAB_00885450:
psVar3 = &CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
else {
LAB_008853b8:
if (uVar1 == 0xffff) goto LAB_00885450;
LAB_008853c2:
psVar3 = (short *)(*(int *)(this + 0x120) + uVar5 * 0x14);
}
if (*psVar3 == -1) {
for (; (ushort)uVar5 != 0xffff; uVar5 = uVar5 & 0xffff) {
if (*(int *)(*(int *)(this + 0x120) + uVar5 * 0x14 + 0x10) != 0) {
KeyValues::deleteThis();
}
uVar5 = CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x11c),(ushort)uVar5);
}
CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x11c));
*(undefined2 *)(this + 0x130) = 0xffff;
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
::Purge((CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
*)(this + 0x120));
*(undefined2 *)(this + 0x132) = 0xffff;
return;
}
if (CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) goto LAB_008854f1;
LAB_008853f4:
puVar4 = (ushort *)(*(int *)(this + 0x120) + uVar5 * 0x14);
}
else {
if (uVar1 != 0xffff) goto LAB_008853f4;
LAB_008854f1:
puVar4 = &CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
uVar1 = *puVar4;
} while( true );
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.