L L4D2node

CServerManager::MarkOldServersAndBeginSearch

0x0005b180 · 252 bytes · __thiscall

_ZN14CServerManager28MarkOldServersAndBeginSearchEv

Decompiled

undefined (1 param)

/* CServerManager::MarkOldServersAndBeginSearch() */

void __thiscall CServerManager::MarkOldServersAndBeginSearch(CServerManager *this)

{
  code *pcVar1;
  int *piVar2;
  KeyValues *this_00;
  int iVar3;
  char *pcVar4;
  
  pcVar4 = "Server manager refreshing...\n";
  DevMsg(2);
  piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x1c))(g_pMatchFramework);
  pcVar1 = *(code **)(*piVar2 + 8);
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pcVar4);
                    /* try { // try from 0005b1e0 to 0005b1e4 has its CatchHandler @ 0005b27c */
  KeyValues::KeyValues(this_00,"OnMatchServerMgrUpdate","update","searchstarted");
  (*pcVar1)(piVar2,this_00);
  if (0 < *(int *)(this + 0x34)) {
    iVar3 = 0;
    do {
      piVar2 = *(int **)(*(int *)(this + 0x28) + iVar3 * 4);
      if (piVar2 != (int *)0x0) {
        (**(code **)(*piVar2 + 0x14))(piVar2);
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(int *)(this + 0x34));
  }
  *(undefined4 *)(this + 0x34) = 0;
  CUtlMemory<CServer*,int>::Purge((CUtlMemory<CServer*,int> *)(this + 0x28));
  *(undefined4 *)(this + 0x48) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined4 *)(this + 0x38) = *(undefined4 *)(this + 0x28);
  *(undefined4 *)(this + 0x3c) = 1;
  *(undefined4 *)(this + 0x44) = 0;
  *(undefined4 *)(this + 0x40) = 0;
  if (*(int *)(net_allow_multicast._28_4_ + 0x30) == 0) {
    *(undefined4 *)(this + 0x3c) = 2;
  }
  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)