CMultiplayRules::CMultiplayRules
0x0046faf0 · 386 bytes · __thiscall
_ZN15CMultiplayRulesC1Ev
Decompiled
undefined (1 param)
/* WARNING: Removing unreachable block (ram,0x0046fb99) */
/* CMultiplayRules::CMultiplayRules() */
void __thiscall CMultiplayRules::CMultiplayRules(CMultiplayRules *this)
{
char cVar1;
char *pcVar2;
int in_GS_OFFSET;
undefined1 *puVar3;
char local_110 [256];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
CGameRules::CGameRules((CGameRules *)this);
*(undefined ***)this = &PTR_Name_00c17028;
*(undefined4 *)(this + 0xc) = 0;
*(undefined4 *)(this + 0x10) = 0;
*(undefined4 *)(this + 0x14) = 0;
*(undefined4 *)(this + 0x18) = 0;
*(undefined4 *)(this + 0x1c) = 0;
*(undefined4 *)(this + 0x24) = 0;
*(undefined4 *)(this + 0x28) = 0;
*(undefined4 *)(this + 0x2c) = 0;
*(undefined4 *)(this + 0x30) = 0;
*(undefined4 *)(this + 0x34) = 0;
/* try { // try from 0046fb68 to 0046fc7c has its CatchHandler @ 0046fc87 */
CGameRules::RefreshSkillData((CGameRules *)this,true);
cVar1 = (**(code **)(*engine + 8))(engine);
pcVar2 = "FCVAR_NEVER_AS_STRING";
if (cVar1 == '\0') {
if ((lservercfgfile[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(lservercfgfile._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(lservercfgfile._28_4_ + 0x24);
}
if (*pcVar2 == '\0') goto LAB_0046fba0;
}
Msg("Executing listen server config file\n");
}
else {
if ((servercfgfile[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(servercfgfile._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(servercfgfile._28_4_ + 0x24);
}
if (*pcVar2 == '\0') goto LAB_0046fba0;
}
Msg("Executing dedicated server config file\n");
}
V_snprintf(local_110,0x100,"exec %s\n",pcVar2);
(**(code **)(*engine + 0x94))(engine,local_110);
LAB_0046fba0:
puVar3 = &DAT_00d539c2;
ConVar::SetValue(nextlevel);
LoadVoiceCommandScript(this);
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(this,puVar3);
}
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.