CEngine::FilterTime
0x00218d60 · 303 bytes · __thiscall
_ZN7CEngine10FilterTimeEf
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEngine::FilterTime(float) */
undefined4 __thiscall CEngine::FilterTime(CEngine *this,float param_1)
{
char cVar1;
int iVar2;
undefined1 *puVar3;
float fVar4;
if (DAT_003b8088 == '\0') {
cVar1 = ConVar::IsFlagSet((ConVar *)sv_hosting_lobby,2);
if (cVar1 == '\0') {
puVar3 = sv_cheats;
LAB_00218e15:
if (*(int *)(*(int *)(puVar3 + 0x1c) + 0x30) != 0) goto LAB_00218d6f;
}
else {
if ((g_pMatchFramework == (int *)0x0) ||
(iVar2 = (**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework), iVar2 == 0)) {
puVar3 = sv_cheats;
}
else {
puVar3 = (undefined1 *)0x0;
}
if (((DAT_003b80d0 == 0 && _DAT_003b80cc == 0) &&
(*(int *)(sv_hosting_lobby._28_4_ + 0x30) == 0)) && (puVar3 != (undefined1 *)0x0))
goto LAB_00218e15;
}
cVar1 = Cmd_IsRptActive();
if (cVar1 == '\0') {
fVar4 = *(float *)(fps_max._28_4_ + 0x2c);
if (fVar4 < 30.0) {
if (fVar4 == 0.0) {
return 1;
}
Warning("sv_cheats is 0 and fps_max is being limited to a minimum of 30 (or set to 0).\n");
ConVar::SetValue(5.773574e-39);
fVar4 = *(float *)(fps_max._28_4_ + 0x2c);
}
goto LAB_00218d7c;
}
}
LAB_00218d6f:
fVar4 = *(float *)(fps_max._28_4_ + 0x2c);
LAB_00218d7c:
if ((0.0 < fVar4) && (g_bDedicatedServerBenchmarkMode == '\0')) {
if (1000.0 <= fVar4) {
fVar4 = 1000.0;
}
if (param_1 < 1.0 / fVar4) {
return 0;
}
}
return 1;
}
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.