L L4D2node

CDirectorSessionManager::FillRemainingSurvivorTeamSlotsWithBots

0x008bd960 · 107 bytes · __cdecl

_ZN23CDirectorSessionManager38FillRemainingSurvivorTeamSlotsWithBotsEv

Decompiled

undefined (0 params)

/* CDirectorSessionManager::FillRemainingSurvivorTeamSlotsWithBots() */

void CDirectorSessionManager::FillRemainingSurvivorTeamSlotsWithBots(void)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  
  piVar1 = (int *)GetGlobalTeam(2);
  if (piVar1 != (int *)0x0) {
    iVar2 = (**(code **)(*piVar1 + 0x354))(piVar1);
    if (iVar2 < 4) {
      iVar2 = (**(code **)(*piVar1 + 0x354))(piVar1);
      if (0 < 4 - iVar2) {
        iVar3 = 0;
        do {
          iVar3 = iVar3 + 1;
          CDirector::AddSurvivorBot(TheDirector,8);
        } while (iVar3 != 4 - iVar2);
      }
    }
  }
  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)