L L4D2node

CMatchTitle::StartServerMap

0x00037d30 · 298 bytes · __thiscall

_ZN11CMatchTitle14StartServerMapEP9KeyValues

Decompiled

undefined (2 params)

/* CMatchTitle::StartServerMap(KeyValues*) */

undefined4 __thiscall CMatchTitle::StartServerMap(CMatchTitle *this,KeyValues *param_1)

{
  code *pcVar1;
  KeyValues *pKVar2;
  undefined4 uVar3;
  int iVar4;
  int *piVar5;
  char *pcVar6;
  int local_20 [4];
  
  local_20[0] = 0;
  pKVar2 = (KeyValues *)(**(code **)(*(int *)g_pMatchExtL4D + 8))(g_pMatchExtL4D,param_1,local_20);
  if (((pKVar2 != (KeyValues *)0x0) && (local_20[0] != 0)) &&
     (piVar5 = *(int **)(g_pMatchExtensions + 0x60), piVar5 != (int *)0x0)) {
    pcVar1 = *(code **)(*piVar5 + 4);
    uVar3 = KeyValues::GetString(pKVar2,"map","");
    iVar4 = (*pcVar1)(piVar5,uVar3);
    if (iVar4 != 0) {
      piVar5 = (int *)(**(code **)(*g_pMatchFramework + 0x28))(g_pMatchFramework);
      pKVar2 = (KeyValues *)(**(code **)(*piVar5 + 0x14))(piVar5,param_1);
                    /* try { // try from 00037dde to 00037e25 has its CatchHandler @ 00037e6a */
      KeyValues::SetString(pKVar2,"map/mapcommand","map");
      pcVar6 = (char *)KeyValues::GetString(param_1,"Options/play","");
      iVar4 = _V_stricmp("commentary",pcVar6);
      if (iVar4 == 0) {
                    /* try { // try from 00037e63 to 00037e67 has its CatchHandler @ 00037e6a */
        KeyValues::SetString(pKVar2,"map/mapcommand","map_commentary");
      }
      (**(code **)(**(int **)(g_pMatchExtensions + 100) + 0x94))
                (*(int **)(g_pMatchExtensions + 100),pKVar2);
      if (pKVar2 == (KeyValues *)0x0) {
        return 1;
      }
      KeyValues::deleteThis();
      return 1;
    }
  }
  return 0;
}

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)