L L4D2node

CDirectorSessionManager::OnPlayerFullyConnected

0x008bcfc0 · 422 bytes · __thiscall

_ZN23CDirectorSessionManager22OnPlayerFullyConnectedEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* CDirectorSessionManager::OnPlayerFullyConnected(CTerrorPlayer*) */

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

{
  undefined4 uVar1;
  int iVar2;
  undefined4 uVar3;
  char cVar4;
  undefined4 *puVar5;
  int iVar6;
  void *pvVar7;
  int iVar8;
  int iVar9;
  
  cVar4 = (**(code **)(*(int *)param_1 + 0x778))(param_1);
  if (cVar4 != '\0') {
    return;
  }
  puVar5 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
  iVar2 = *(int *)(this + 0x44);
  uVar3 = *puVar5;
  iVar9 = iVar2 + 1;
  uVar1 = *(undefined4 *)(gpGlobals + 0xc);
  iVar8 = *(int *)(this + 0x3c);
  if (iVar8 < iVar9) {
    iVar6 = *(int *)(this + 0x40);
    if (iVar6 < 0) goto LAB_008bd002;
    if (iVar6 == 0) {
      if (iVar8 == 0) {
        if (iVar9 < 5) {
          iVar6 = 4;
          goto LAB_008bd077;
        }
        iVar8 = 4;
      }
      do {
        iVar6 = iVar8 * 2;
        if (iVar9 <= iVar6) break;
        iVar6 = iVar8 * 4;
        iVar8 = iVar6;
      } while (iVar6 < iVar9);
    }
    else {
      for (iVar6 = (iVar2 / iVar6 + 1) * iVar6; iVar6 < iVar9; iVar6 = (iVar6 + iVar9) / 2) {
      }
    }
LAB_008bd077:
    *(int *)(this + 0x3c) = iVar6;
    if (*(void **)(this + 0x38) != (void *)0x0) {
      pvVar7 = realloc(*(void **)(this + 0x38),iVar6 << 3);
      iVar9 = *(int *)(this + 0x44);
      *(void **)(this + 0x38) = pvVar7;
      *(void **)(this + 0x48) = pvVar7;
      *(int *)(this + 0x44) = iVar9 + 1;
      iVar9 = (iVar9 + 1) - iVar2;
      goto joined_r0x008bd0ba;
    }
    pvVar7 = malloc(iVar6 << 3);
    *(void **)(this + 0x38) = pvVar7;
  }
  else {
LAB_008bd002:
    pvVar7 = *(void **)(this + 0x38);
  }
  *(int *)(this + 0x44) = iVar9;
  iVar9 = iVar9 - iVar2;
  *(void **)(this + 0x48) = pvVar7;
joined_r0x008bd0ba:
  if (0 < iVar9 + -1) {
    _V_memmove((void *)((int)pvVar7 + iVar2 * 8 + 8),(void *)((int)pvVar7 + iVar2 * 8),
               (iVar9 + -1) * 8);
    pvVar7 = *(void **)(this + 0x38);
  }
  puVar5 = (undefined4 *)((int)pvVar7 + iVar2 * 8);
  if (puVar5 != (undefined4 *)0x0) {
    puVar5[1] = uVar1;
    *puVar5 = uVar3;
  }
  if ((this[0x28] != (CDirectorSessionManager)0x0) &&
     (cVar4 = (**(code **)(*engine + 0x168))(engine), cVar4 == '\0')) {
    CBasePlayer::LockPlayerInPlace((CBasePlayer *)param_1);
    return;
  }
  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)