CMatchTitleGameSettingsMgr::ExtendLobbyDetailsTemplate
0x00039860 · 412 bytes · __thiscall
_ZN26CMatchTitleGameSettingsMgr26ExtendLobbyDetailsTemplateEP9KeyValuesPKcS1_
Decompiled
undefined (4 params)
/* CMatchTitleGameSettingsMgr::ExtendLobbyDetailsTemplate(KeyValues*, char const*, KeyValues*) */
void __thiscall
CMatchTitleGameSettingsMgr::ExtendLobbyDetailsTemplate
(CMatchTitleGameSettingsMgr *this,KeyValues *param_1,char *param_2,KeyValues *param_3)
{
int iVar1;
uint uVar2;
int iVar3;
int in_GS_OFFSET;
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((ExtendLobbyDetailsTemplate(KeyValues*,char_const*,KeyValues*)::pkvExt == '\0') &&
(iVar1 = __cxa_guard_acquire(&ExtendLobbyDetailsTemplate(KeyValues*,char_const*,KeyValues*)::
pkvExt), iVar1 != 0)) {
/* try { // try from 000399e7 to 000399eb has its CatchHandler @ 00039a07 */
ExtendLobbyDetailsTemplate(KeyValues*,char_const*,KeyValues*)::pkvExt =
KeyValues::FromString
("Settings",
" Game { mode #empty# difficulty #empty# vanilla #int#1 maxrounds #int#3 campaign #empty# chapter #int#1 state #empty# sk_versus #empty# ModeInfo { DisplayTitle #empty# workshopid #uint64#0 addon #int#0 } MissionInfo { Version #empty# BuiltIn #empty# DisplayTitle #empty# Author #empty# Website #empty# workshopid #uint64#0 addon #int#0 } } "
,(char **)0x0);
__cxa_guard_release(&ExtendLobbyDetailsTemplate(KeyValues*,char_const*,KeyValues*)::pkvExt);
}
KeyValues::MergeFrom
(param_1,ExtendLobbyDetailsTemplate(KeyValues*,char_const*,KeyValues*)::pkvExt,1);
if ((param_2 != (char *)0x0) && (iVar1 = _V_stricmp(param_2,"reserve"), iVar1 == 0)) {
KeyValues::SetInt(param_1,"GameExtras/csguns",-1);
iVar1 = KeyValues::GetInt(param_3,"Members/numMachines",0);
if (0 < iVar1) {
iVar3 = 0;
do {
while( true ) {
CFmtStrN<256>::CFmtStrN(local_12c,"Members/machine%d/dlcmask",iVar3);
uVar2 = KeyValues::GetUint64((char *)param_3,ZEXT48(local_127));
if ((uVar2 & 0x200000) == 0) break;
iVar3 = iVar3 + 1;
KeyValues::SetInt(param_1,"GameExtras/csguns",1);
if (iVar3 == iVar1) goto LAB_000399b8;
}
iVar3 = iVar3 + 1;
} while (iVar3 != iVar1);
}
}
LAB_000399b8:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.