L L4D2node

CMaster::RemoveServer

0x00203e70 · 211 bytes · __thiscall

_ZN7CMaster12RemoveServerEP8netadr_s

Decompiled

undefined (2 params)

/* CMaster::RemoveServer(netadr_s*) */

undefined4 __thiscall CMaster::RemoveServer(CMaster *this,netadr_s *param_1)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = 0;
  iVar4 = 0;
  if (0 < *(int *)(this + 0x10)) {
    do {
      uVar1 = netadr_s::CompareAdr((netadr_s *)(*(int *)(this + 4) + iVar4),param_1,false);
      if ((char)uVar1 != '\0') {
        iVar2 = *(int *)(this + 4) + iVar4;
        *(undefined4 *)(iVar2 + 0x1c) = 0;
        CUtlMemory<CHeartbeat,int>::Purge((CUtlMemory<CHeartbeat,int> *)(iVar2 + 0x10));
        *(undefined4 *)(iVar2 + 0x20) = *(undefined4 *)(iVar2 + 0x10);
        CUtlMemory<CHeartbeat,int>::Purge((CUtlMemory<CHeartbeat,int> *)(iVar2 + 0x10));
        iVar2 = *(int *)(this + 0x10);
        iVar3 = (iVar2 - iVar5) + -1;
        if (0 < iVar3) {
          _V_memmove((void *)(*(int *)(this + 4) + iVar4),
                     (void *)(*(int *)(this + 4) + (iVar5 * 9 + 9) * 4),iVar3 * 0x24);
          iVar2 = *(int *)(this + 0x10);
        }
        *(int *)(this + 0x10) = iVar2 + -1;
        return uVar1;
      }
      iVar5 = iVar5 + 1;
      iVar4 = iVar4 + 0x24;
    } while (iVar5 < *(int *)(this + 0x10));
  }
  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)