L L4D2node

CMatchTitleGameSettingsMgr::EndGameToLobbyUpdate

0x0003b310 · 479 bytes · __thiscall

_ZN26CMatchTitleGameSettingsMgr20EndGameToLobbyUpdateEP9KeyValuesPS1_S2_

Decompiled

undefined (4 params)

/* CMatchTitleGameSettingsMgr::EndGameToLobbyUpdate(KeyValues*, KeyValues**, KeyValues**) */

void __thiscall
CMatchTitleGameSettingsMgr::EndGameToLobbyUpdate
          (CMatchTitleGameSettingsMgr *this,KeyValues *param_1,KeyValues **param_2,
          KeyValues **param_3)

{
  KeyValues *pKVar1;
  int iVar2;
  int iVar3;
  KeyValues *pKVar4;
  int iVar5;
  int in_GS_OFFSET;
  uint in_stack_fffffea8;
  int iVar6;
  int local_13c;
  CFmtStrN<256> local_12c [5];
  char local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pKVar1 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_fffffea8);
  iVar6 = 0;
                    /* try { // try from 0003b368 to 0003b36c has its CatchHandler @ 0003b4ea */
  KeyValues::KeyValues(pKVar1,"UpdateSettings",(IKeyValuesSystem *)0x0,false);
  *param_2 = pKVar1;
  iVar2 = KeyValues::GetInt(param_1,"Members/numMachines",0);
  local_13c = 0;
  if (0 < iVar2) {
    do {
      CFmtStrN<256>::CFmtStrN(local_12c,"Members/machine%d",local_13c);
      pKVar1 = (KeyValues *)KeyValues::FindKey(param_1,local_127,false);
      iVar3 = KeyValues::GetInt(pKVar1,"numPlayers",0);
      if (0 < iVar3) {
        iVar5 = 0;
        do {
          CFmtStrN<256>::CFmtStrN(local_12c,"player%d",iVar5,iVar6);
          pKVar4 = (KeyValues *)KeyValues::FindKey(pKVar1,local_127,false);
          if (pKVar4 != (KeyValues *)0x0) {
            *param_3 = pKVar4;
            param_3 = param_3 + 1;
            iVar6 = iVar5;
            CFmtStrN<256>::CFmtStrN
                      (local_12c,"Update/Members/machine%d/player%d/game/ready",local_13c,iVar5);
            KeyValues::SetString(*param_2,local_127,"no");
          }
          iVar5 = iVar5 + 1;
        } while (iVar5 != iVar3);
      }
      local_13c = local_13c + 1;
    } while (local_13c != iVar2);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)