InvokePerFrameMethod
0x00467e60 · 110 bytes · __regparm3
_ZL20InvokePerFrameMethodM19IGameSystemPerFrameFvvEPKc.isra.23.constprop.39
Decompiled
undefined (2 params)
/* InvokePerFrameMethod(void (IGameSystemPerFrame::*)(), char const*) [clone .isra.23] [clone
.constprop.39] */
void __regparm3 InvokePerFrameMethod(_func_void *param_1,char *param_2)
{
int *piVar1;
int iVar2;
int *piVar3;
_func_void *p_Var4;
int iVar5;
iVar2 = DAT_00f7cd84;
if (0 < DAT_00f7cd84) {
iVar5 = 0;
do {
piVar3 = mdlcache;
piVar1 = *(int **)(s_GameSystemsPerFrame + iVar5 * 4);
(**(code **)(*mdlcache + 0x68))(mdlcache);
p_Var4 = param_1;
if (((uint)param_1 & 1) != 0) {
p_Var4 = *(_func_void **)(param_1 + *piVar1 + -1);
}
/* try { // try from 00467eb4 to 00467eb5 has its CatchHandler @ 00467ece */
(*p_Var4)(piVar1);
iVar5 = iVar5 + 1;
(**(code **)(*piVar3 + 0x6c))(piVar3);
} while (iVar5 != iVar2);
}
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.