CTeamplayRoundBasedRules::CheckNextLevelCvar
0x004ca1e0 · 289 bytes · __thiscall
_ZN24CTeamplayRoundBasedRules18CheckNextLevelCvarEv
Decompiled
undefined (1 param)
/* CTeamplayRoundBasedRules::CheckNextLevelCvar() */
CTeamplayRoundBasedRules __thiscall
CTeamplayRoundBasedRules::CheckNextLevelCvar(CTeamplayRoundBasedRules *this)
{
CTeamplayRoundBasedRules CVar1;
int iVar2;
int *piVar3;
char *pcVar4;
undefined1 *puVar5;
CVar1 = this[0x268];
if (CVar1 != (CTeamplayRoundBasedRules)0x0) {
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar4 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar4 = *(char **)(nextlevel._28_4_ + 0x24);
}
if (*pcVar4 == '\0') {
return (CTeamplayRoundBasedRules)0x0;
}
}
if ((nextlevel._20_4_ & 0x1000) == 0) {
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(nextlevel._28_4_ + 0x24) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(nextlevel._28_4_ + 0x24);
}
iVar2 = (**(code **)(*engine + 4))(engine,puVar5);
}
else {
iVar2 = (**(code **)(*engine + 4))(engine,"FCVAR_NEVER_AS_STRING");
}
if (iVar2 == 0) {
return (CTeamplayRoundBasedRules)0x0;
}
piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"teamplay_game_over",0,0);
if (piVar3 != (int *)0x0) {
(**(code **)(*piVar3 + 0x3c))(piVar3,"reason","NextLevel CVAR");
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
}
(**(code **)(*(int *)this + 0x248))(this);
}
return CVar1;
}
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.