CDirectorItemManager::OnMapLoaded
0x008a5f40 · 210 bytes · __thiscall
_ZN20CDirectorItemManager11OnMapLoadedEv
Decompiled
undefined (1 param)
/* CDirectorItemManager::OnMapLoaded() */
void __thiscall CDirectorItemManager::OnMapLoaded(CDirectorItemManager *this)
{
CUtlVector<CDirectorItemManager::ItemRestoreInfo,CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int>>
*this_00;
char cVar1;
int iVar2;
int iVar3;
int iVar4;
cVar1 = CTerrorGameRules::IsVersusMode();
if (cVar1 == '\0') {
cVar1 = CDirector::IsTransitioned(TheDirector);
if (cVar1 != '\0') {
return;
}
}
iVar2 = *(int *)(this + 0x414) + -1;
if (-1 < iVar2) {
iVar4 = iVar2 * 0x94;
do {
iVar3 = *(int *)(this + 0x408) + iVar4;
iVar4 = iVar4 + -0x94;
this_00 = (CUtlVector<CDirectorItemManager::ItemRestoreInfo,CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int>>
*)(iVar3 + 0x80);
CUtlVector<CDirectorItemManager::ItemRestoreInfo,CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int>>
::RemoveAll(this_00);
CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int>::Purge
((CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int> *)this_00);
*(undefined4 *)(iVar3 + 0x90) = *(undefined4 *)(iVar3 + 0x80);
CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int>::Purge
((CUtlMemory<CDirectorItemManager::ItemRestoreInfo,int> *)this_00);
iVar2 = iVar2 + -1;
} while (iVar2 != -1);
}
*(undefined4 *)(this + 0x414) = 0;
if (*(int *)(director_debug_revisit._28_4_ + 0x30) == 0) {
return;
}
DevMsg("REVISIT: Clearing all revisit record\n");
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.