L L4D2node

CDirector::FireGameEvent

0x0088b350 · 428 bytes · __thiscall

_ZN9CDirector13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CDirector::FireGameEvent(IGameEvent*) */

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

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  int *piVar4;
  CTerrorPlayer *pCVar5;
  undefined8 uVar6;
  
  CDirectorVersusMode::FireGameEventNonVirtual(*(CDirectorVersusMode **)(this + 0x63c),param_1);
  CDirectorSessionManager::FireGameEvent(*(CDirectorSessionManager **)(this + 0x634),param_1);
  CDirectorItemManager::FireGameEvent(*(CDirectorItemManager **)(this + 0x62c),param_1);
  pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar2 == "player_death") || (iVar3 = _V_stricmp(pcVar2,"player_death"), iVar3 == 0)) {
    iVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar5 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar3);
    if ((pCVar5 != (CTerrorPlayer *)0x0) &&
       (cVar1 = (**(code **)(*(int *)pCVar5 + 0x16c))(pCVar5), cVar1 != '\0')) {
      OnPlayerDeath(this,pCVar5);
      return;
    }
    return;
  }
  pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar2 != "player_disconnect") &&
     (iVar3 = _V_stricmp(pcVar2,"player_disconnect"), iVar3 != 0)) {
    pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
    if ((pcVar2 != "player_first_spawn") &&
       (iVar3 = _V_stricmp(pcVar2,"player_first_spawn"), iVar3 != 0)) {
      return;
    }
    iVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    piVar4 = (int *)UTIL_PlayerByUserId(iVar3);
    if (piVar4 == (int *)0x0) {
      return;
    }
    cVar1 = (**(code **)(*piVar4 + 0x16c))(piVar4);
    if (cVar1 == '\0') {
      return;
    }
    cVar1 = (**(code **)(*piVar4 + 0x778))(piVar4);
    if (cVar1 != '\0') {
      return;
    }
    (**(code **)(*engine + 0x9c))(engine,piVar4[0xc],"cl_consistencycheck");
    return;
  }
  uVar6 = (**(code **)(*(int *)param_1 + 0x20))(param_1,&DAT_00cdc6aa,0,0);
  PlayerAvatarSet(CONCAT44((int)uVar6,this),(KeyValues *)((ulonglong)uVar6 >> 0x20));
  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)