CDirectorItemManager::Reset
0x008a36d0 · 396 bytes · __thiscall
_ZN20CDirectorItemManager5ResetEv
Decompiled
undefined (1 param)
/* CDirectorItemManager::Reset() */
void __thiscall CDirectorItemManager::Reset(CDirectorItemManager *this)
{
int iVar1;
CDirectorItemManager CVar2;
int iVar3;
CDirectorItemManager CVar4;
CDirectorItemManager *pCVar5;
longdouble lVar6;
CVar4 = this[0x457];
if (CVar4 != (CDirectorItemManager)0xff) {
iVar1 = *(int *)(this + 0x44c);
iVar3 = 0;
if (0 < iVar1) {
do {
CVar2 = SUB41(iVar3,0);
if ((iVar3 < iVar1) && ((byte)CVar2 <= (byte)CVar4)) {
if ((CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char,CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char>,unsigned_char>>
::Links(unsigned_char)::s_Sentinel == '\0') &&
(iVar1 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char,CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char>,unsigned_char>>
::Links(unsigned_char)::s_Sentinel), iVar1 != 0)) {
CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char,CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char>,unsigned_char>>
::Links(unsigned_char)::s_Sentinel = 0xff;
DAT_00f5e1e1 = 0xff;
DAT_00f5e1e2 = 0xff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char,CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,scavenge_cache_entry_t,unsigned_char>::Node_t,unsigned_char>,unsigned_char>>
::Links(unsigned_char)::s_Sentinel);
}
pCVar5 = (CDirectorItemManager *)(*(int *)(this + 0x448) + iVar3 * 0x10);
if (*pCVar5 != CVar2) {
pCVar5[1] = this[0x456];
*(CDirectorItemManager *)(*(int *)(this + 0x448) + iVar3 * 0x10) = CVar2;
this[0x456] = CVar2;
}
CVar4 = this[0x457];
}
} while (((CVar4 != CVar2) &&
(iVar1 = *(int *)(this + 0x44c), (int)(iVar3 + 1U & 0xff) < iVar1)) &&
(iVar3 = iVar3 + 1, iVar3 != 0xff));
}
this[0x454] = (CDirectorItemManager)0xff;
this[0x455] = (CDirectorItemManager)0x0;
}
*(undefined4 *)(this + 0x1c) = 0;
this[0x28] = (CDirectorItemManager)0x0;
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 5.0 != *(float *)(this + 0xc)) {
(**(code **)(*(int *)(this + 4) + 4))(this + 4,this + 0xc);
*(float *)(this + 0xc) = (float)lVar6 + 5.0;
}
if (*(float *)(this + 8) != 5.0) {
(**(code **)(*(int *)(this + 4) + 4))(this + 4,this + 8);
*(undefined4 *)(this + 8) = 0x40a00000;
}
this[0x464] = (CDirectorItemManager)0x1;
this[0x465] = (CDirectorItemManager)0x1;
return;
}
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.