CServerGameDLL::Think
0x006c4580 · 187 bytes · __cdecl
_ZN14CServerGameDLL5ThinkEb
Decompiled
undefined (1 param)
/* CServerGameDLL::Think(bool) */
void CServerGameDLL::Think(bool param_1)
{
float fVar1;
int iVar2;
undefined3 in_stack_00000005;
if ((*(float *)(_param_1 + 4) != 0.0) && (*(float *)(_param_1 + 4) < *(float *)(gpGlobals + 0xc)))
{
iVar2 = UTIL_PlayerByIndex(1);
if (((iVar2 != 0) &&
(((fVar1 = *(float *)(iVar2 + 0x1d5c), fVar1 == 0.0 ||
(*(float *)(gpGlobals + 0xc) <= fVar1 && fVar1 != *(float *)(gpGlobals + 0xc))) &&
(*(char *)(iVar2 + 0x2186) == '\0')))) &&
(*(float *)(_param_1 + 8) <= (float)*(int *)(iVar2 + 0x100))) {
(**(code **)(*engine + 0x94))(engine,"autosavedangerousissafe\n");
}
*(undefined4 *)(_param_1 + 4) = 0;
*(undefined4 *)(_param_1 + 8) = 0;
}
if (g_pServerDemoSystem != (int *)0x0) {
/* WARNING: Could not recover jumptable at 0x006c45b8. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*g_pServerDemoSystem + 8))();
return;
}
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.