L L4D2node

CDirector::OnFinaleEscapeFinished

0x008773b0 · 410 bytes · __thiscall

_ZN9CDirector22OnFinaleEscapeFinishedEv

Decompiled

undefined (1 param)

/* CDirector::OnFinaleEscapeFinished() */

void __thiscall CDirector::OnFinaleEscapeFinished(CDirector *this)

{
  code *pcVar1;
  char cVar2;
  int *piVar3;
  undefined1 *puVar4;
  undefined4 uVar5;
  undefined4 local_30 [3];
  undefined4 local_24;
  undefined4 local_20;
  
  if ((**(int **)(this + 0x638) == 5) && (**(char **)(this + 0x648) == '\0')) {
    return;
  }
  *(undefined4 *)(this + 0x164) = 3;
  piVar3 = (int *)CGlobalEntityList::FindEntityByClassname
                            ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"trigger_finale");
  if ((piVar3 != (int *)0x0) ||
     (piVar3 = (int *)CGlobalEntityList::FindEntityByClassname
                                ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"finale_trigger"),
     piVar3 != (int *)0x0)) {
    local_30[0] = 0;
    local_24 = 0xffffffff;
    local_20 = 0;
    (**(code **)(*piVar3 + 0xb4))(piVar3,"FinaleWon",0,0,local_30,0);
  }
  piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"finale_win",0,0);
  if (piVar3 != (int *)0x0) {
    puVar4 = &DAT_00d539c2;
    if (*(undefined1 **)(gpGlobals + 0x3c) != (undefined1 *)0x0) {
      puVar4 = *(undefined1 **)(gpGlobals + 0x3c);
    }
    (**(code **)(*piVar3 + 0x3c))(piVar3,"map_name",puVar4);
    pcVar1 = *(code **)(*piVar3 + 0x30);
    uVar5 = GetDifficulty();
    (*pcVar1)(piVar3,"difficulty",uVar5);
    (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
  }
  ForEachTerrorPlayer<MissionWon>((MissionWon *)local_30);
  cVar2 = (**(code **)(*(int *)this + 0x68))(this);
  if ((cVar2 == '\0') || (cVar2 = CDirectorVersusMode::ShouldShowCreditsNonVirtual(), cVar2 == '\0')
     ) {
    StartScenarioExit(this);
  }
  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)