L L4D2node

CDirectorSessionManager::OnPlayerDisconnected

0x008bcf00 · 163 bytes · __thiscall

_ZN23CDirectorSessionManager20OnPlayerDisconnectedEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* CDirectorSessionManager::OnPlayerDisconnected(CTerrorPlayer*) */

void __thiscall
CDirectorSessionManager::OnPlayerDisconnected(CDirectorSessionManager *this,CTerrorPlayer *param_1)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  cVar2 = (**(code **)(*(int *)param_1 + 0x778))(param_1);
  if (cVar2 != '\0') {
    return;
  }
  iVar3 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
  iVar4 = *(int *)(this + 0x10);
  if (iVar4 < 1) {
LAB_008bcf5c:
    this[0x36] = (CDirectorSessionManager)0x1;
  }
  else {
    piVar1 = *(int **)(this + 4);
    iVar5 = 0;
    if (iVar3 != *piVar1) {
      do {
        iVar5 = iVar5 + 1;
        if (iVar5 == iVar4) goto LAB_008bcf5c;
      } while (iVar3 != piVar1[iVar5]);
      if (iVar5 == -1) goto LAB_008bcf5c;
    }
    iVar3 = (iVar4 - iVar5) + -1;
    if (0 < iVar3) {
      _V_memmove(piVar1 + iVar5,piVar1 + iVar5 + 1,iVar3 * 4);
      iVar4 = *(int *)(this + 0x10);
    }
    this[0x36] = (CDirectorSessionManager)0x1;
    *(int *)(this + 0x10) = iVar4 + -1;
  }
  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)