CTestScriptMgr::LoopForNumSeconds
0x0021a580 · 221 bytes · __cdecl
_ZN14CTestScriptMgr17LoopForNumSecondsEPKcd
Decompiled
undefined (2 params)
/* CTestScriptMgr::LoopForNumSeconds(char const*, double) */
void CTestScriptMgr::LoopForNumSeconds(char *param_1,double param_2)
{
int iVar1;
void *pvVar2;
longdouble lVar3;
undefined4 in_stack_00000010;
if (*(int *)(param_1 + 4) == 0) {
Error("CTestScriptMgr: not initialized.");
}
pvVar2 = (void *)FindLoop((CTestScriptMgr *)param_1,param_2._0_4_);
if (pvVar2 == (void *)0x0) {
Error("CTestScriptMgr::LoopForNumSeconds( %s ): no loop with this name exists.",param_2._0_4_);
}
lVar3 = (longdouble)Plat_FloatTime();
if ((double)CONCAT44(in_stack_00000010,param_2._4_4_) <=
(double)lVar3 - *(double *)((int)pvVar2 + 4)) {
iVar1 = *(int *)((int)pvVar2 + 0x50);
CUtlLinkedList<CLoopInfo*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CLoopInfo*,int>,int>>::
Unlink((CUtlLinkedList<CLoopInfo*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CLoopInfo*,int>,int>>
*)(param_1 + 0x30),iVar1);
*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar1 * 0xc + 8) = *(undefined4 *)(param_1 + 0x44);
*(int *)(param_1 + 0x44) = iVar1;
operator_delete(pvVar2);
return;
}
/* WARNING: Could not recover jumptable at 0x0021a63b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)(g_pFileSystem + 4) + 0x10))();
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.