L L4D2node

CDirectorSessionManager::MakeLowViolenceServer

0x008bdf00 · 198 bytes · __cdecl

_ZN23CDirectorSessionManager21MakeLowViolenceServerEv

Decompiled

undefined (0 params)

/* CDirectorSessionManager::MakeLowViolenceServer() */

void CDirectorSessionManager::MakeLowViolenceServer(void)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  undefined4 local_34;
  int local_30 [8];
  
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
  local_34 = 0;
                    /* try { // try from 008bdf33 to 008bdf98 has its CatchHandler @ 008bdfc9 */
  iVar3 = TheNextBots();
  uVar4 = (uint)*(ushort *)(iVar3 + 0x10);
  if (uVar4 != 0xffff) {
    iVar5 = *(int *)(iVar3 + 4);
    do {
      cVar2 = CommonInfectedCollector::operator()
                        ((CommonInfectedCollector *)&local_34,*(INextBot **)(iVar5 + uVar4 * 8));
      if (cVar2 == '\0') break;
      iVar5 = *(int *)(iVar3 + 4);
      uVar4 = (uint)*(ushort *)(iVar5 + 6 + uVar4 * 8);
    } while (uVar4 != 0xffff);
  }
  iVar3 = 0;
  if (0 < local_30[3]) {
    do {
      piVar1 = *(int **)(local_30[0] + iVar3 * 4);
      (**(code **)(*piVar1 + 0x5c4))(piVar1);
      iVar3 = iVar3 + 1;
    } while (iVar3 < local_30[3]);
  }
  local_30[3] = 0;
  CUtlMemory<Infected*,int>::Purge((CUtlMemory<Infected*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<Infected*,int>::Purge((CUtlMemory<Infected*,int> *)local_30);
  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)