CMultiplayRules::ChangeLevel
0x0046efa0 · 315 bytes · __thiscall
_ZN15CMultiplayRules11ChangeLevelEv
Decompiled
undefined (1 param)
/* CMultiplayRules::ChangeLevel() */
void __thiscall CMultiplayRules::ChangeLevel(CMultiplayRules *this)
{
int iVar1;
char *pcVar2;
int in_GS_OFFSET;
char local_30 [32];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar2 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(nextlevel._28_4_ + 0x24);
}
}
if (*pcVar2 != '\0') {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar2 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(nextlevel._28_4_ + 0x24);
}
}
iVar1 = (**(code **)(*engine + 4))(engine,pcVar2);
if (iVar1 != 0) {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((nextlevel._20_4_ & 0x1000) == 0) {
pcVar2 = "";
if (*(char **)(nextlevel._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(nextlevel._28_4_ + 0x24);
}
}
V_strncpy(local_30,pcVar2,0x20);
goto LAB_0046f04e;
}
}
(**(code **)(*(int *)this + 0x240))(this,local_30,0x20,0);
m_nMapCycleindex = m_nMapCycleindex + 1;
if (DAT_00f7dccc <= m_nMapCycleindex) {
m_nMapCycleindex = 0;
}
LAB_0046f04e:
g_fGameOver = 1;
Msg("CHANGE LEVEL: %s\n",local_30);
(**(code **)*engine)(engine,local_30,0);
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.