CCSGameRules::GetMapRemainingTime
0x00438840 · 192 bytes · __thiscall
_ZN12CCSGameRules19GetMapRemainingTimeEv
Decompiled
undefined (1 param)
/* CCSGameRules::GetMapRemainingTime() */
longdouble __thiscall CCSGameRules::GetMapRemainingTime(CCSGameRules *this)
{
char *pcVar1;
int iVar2;
float fVar3;
pcVar1 = "FCVAR_NEVER_AS_STRING";
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar1 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar1 = *(char **)(nextlevel._28_4_ + 0x24);
}
}
if (*pcVar1 != '\0') {
pcVar1 = "FCVAR_NEVER_AS_STRING";
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar1 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar1 = *(char **)(nextlevel._28_4_ + 0x24);
}
}
iVar2 = (**(code **)(*engine + 4))(engine,pcVar1);
fVar3 = 0.0;
if (iVar2 != 0) goto LAB_004388dc;
}
if (*(int *)(mp_timelimit._28_4_ + 0x30) < 1) {
return (longdouble)-1.0;
}
fVar3 = ((float)(*(int *)(mp_timelimit._28_4_ + 0x30) * 0x3c) - *(float *)(gpGlobals + 0xc)) +
*(float *)(this + 0x248);
if (fVar3 <= 0.0) {
fVar3 = 0.0;
}
LAB_004388dc:
return (longdouble)fVar3;
}
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.