L L4D2node

CDirectorSessionManager::FireGameEvent

0x008bdde0 · 279 bytes · __thiscall

_ZN23CDirectorSessionManager13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CDirectorSessionManager::FireGameEvent(IGameEvent*) */

void __thiscall
CDirectorSessionManager::FireGameEvent(CDirectorSessionManager *this,IGameEvent *param_1)

{
  undefined4 uVar1;
  char cVar2;
  char *pcVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  int iVar7;
  int *piVar8;
  code *pcVar9;
  int local_20 [4];
  
  pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar3 != "player_connect_full") &&
     (iVar4 = _V_stricmp(pcVar3,"player_connect_full"), iVar4 != 0)) {
    return;
  }
  local_20[0] = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
  piVar5 = (int *)UTIL_PlayerByUserId(local_20[0]);
  if (piVar5 == (int *)0x0) {
    return;
  }
  cVar2 = (**(code **)(*piVar5 + 0x778))(piVar5);
  if (cVar2 != '\0') {
    return;
  }
  iVar4 = *(int *)(this + 0x10);
  if (iVar4 < 1) {
LAB_008bde7c:
    CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
              ((CUtlVector<int,CUtlMemory<int,int>> *)(this + 4),iVar4,local_20);
    uVar1 = *(undefined4 *)(this + 0x10);
    uVar6 = (**(code **)(*piVar5 + 0xb8))(piVar5);
    DevMsg("[INTROS] Adding %s to fully connected userid\'s. New count: %d\n",uVar6,uVar1);
    pcVar9 = *(code **)(*(int *)this + 0x1c);
  }
  else {
    if (**(int **)(this + 4) != local_20[0]) {
      iVar7 = 0;
      do {
        iVar7 = iVar7 + 1;
        if (iVar7 == iVar4) goto LAB_008bde7c;
      } while ((*(int **)(this + 4))[iVar7] != local_20[0]);
      if (iVar7 == -1) goto LAB_008bde7c;
    }
    pcVar9 = *(code **)(*(int *)this + 0x1c);
  }
  cVar2 = (**(code **)(*piVar5 + 0x16c))(piVar5);
  piVar8 = (int *)0x0;
  if (cVar2 != '\0') {
    piVar8 = piVar5;
  }
  (*pcVar9)(this,piVar8);
  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)