CTestScriptMgr::LoopCount
0x0021a3d0 · 208 bytes · __thiscall
_ZN14CTestScriptMgr9LoopCountEPKci
Decompiled
undefined (3 params)
/* CTestScriptMgr::LoopCount(char const*, int) */
void __thiscall CTestScriptMgr::LoopCount(CTestScriptMgr *this,char *param_1,int param_2)
{
int iVar1;
int *piVar2;
if (*(int *)(this + 4) == 0) {
Error("CTestScriptMgr: not initialized.");
}
piVar2 = (int *)FindLoop(this,param_1);
if (piVar2 == (int *)0x0) {
Error("CTestScriptMgr::LoopCount( %s ): no loop with this name exists.",param_1);
}
iVar1 = *piVar2;
*piVar2 = iVar1 + 1;
if ((param_2 <= iVar1 + 1) && (param_2 != -1)) {
iVar1 = piVar2[0x14];
CUtlLinkedList<CLoopInfo*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CLoopInfo*,int>,int>>::
Unlink((CUtlLinkedList<CLoopInfo*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CLoopInfo*,int>,int>>
*)(this + 0x30),iVar1);
*(undefined4 *)(*(int *)(this + 0x30) + iVar1 * 0xc + 8) = *(undefined4 *)(this + 0x44);
*(int *)(this + 0x44) = iVar1;
operator_delete(piVar2);
return;
}
(**(code **)(*(int *)(g_pFileSystem + 4) + 0x10))
(g_pFileSystem + 4,*(undefined4 *)(this + 4),piVar2[0x13],0);
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.