CTeamplayRules::Think
0x004d0de0 · 168 bytes · __thiscall
_ZN14CTeamplayRules5ThinkEv
Decompiled
undefined (1 param)
/* CTeamplayRules::Think() */
void __thiscall CTeamplayRules::Think(CTeamplayRules *this)
{
int iVar1;
int iVar2;
float fVar3;
CMultiplayRules::Think((CMultiplayRules *)this);
if (g_fGameOver != '\0') {
CMultiplayRules::Think((CMultiplayRules *)this);
return;
}
fVar3 = *(float *)(mp_timelimit._28_4_ + 0x2c) * 60.0;
if ((fVar3 == 0.0) ||
(*(float *)(gpGlobals + 0xc) <= fVar3 && fVar3 != *(float *)(gpGlobals + 0xc))) {
if ((*(float *)(fraglimit._28_4_ + 0x2c) == 0.0) || (num_teams < 1)) {
return;
}
iVar2 = 0;
iVar1 = team_scores;
while ((float)iVar1 < *(float *)(fraglimit._28_4_ + 0x2c)) {
iVar2 = iVar2 + 1;
if (iVar2 == num_teams) {
return;
}
iVar1 = (&team_scores)[iVar2];
}
}
/* WARNING: Could not recover jumptable at 0x004d0e80. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x244))();
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.