L L4D2node

CSlideshowDisplay::RestoreControlPanels

0x00823830 · 281 bytes · __thiscall

_ZN17CSlideshowDisplay20RestoreControlPanelsEv

Decompiled

undefined (1 param)

/* CSlideshowDisplay::RestoreControlPanels() */

void __thiscall CSlideshowDisplay::RestoreControlPanels(CSlideshowDisplay *this)

{
  uint uVar1;
  CVGuiScreen *this_00;
  char *pcVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined *puVar6;
  
  this_00 = (CVGuiScreen *)
            CGlobalEntityList::FindEntityByClassname
                      ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"vgui_screen");
  do {
    if (this_00 == (CVGuiScreen *)0x0) {
      pcVar2 = (char *)CVGuiScreen::GetPanelName((CVGuiScreen *)0x0);
      iVar3 = _V_strcmp(pcVar2,"slideshow_display_screen");
      if (iVar3 == 0) {
        return;
      }
    }
    else {
      uVar1 = *(uint *)(this_00 + 0x220);
      if (((uVar1 == 0xffffffff) ||
          (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
        if (this == (CSlideshowDisplay *)0x0) goto LAB_008238c0;
      }
      else if (this == *(CSlideshowDisplay **)(puVar6 + 4)) {
LAB_008238c0:
        pcVar2 = (char *)CVGuiScreen::GetPanelName(this_00);
        iVar3 = _V_strcmp(pcVar2,"slideshow_display_screen");
        if (iVar3 == 0) {
          iVar4 = CUtlVector<CHandle<CVGuiScreen>,CUtlMemory<CHandle<CVGuiScreen>,int>>::
                  InsertBefore((CUtlVector<CHandle<CVGuiScreen>,CUtlMemory<CHandle<CVGuiScreen>,int>>
                                *)(this + 0x588),*(int *)(this + 0x594));
          iVar3 = *(int *)(this + 0x588);
          puVar5 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
          *(undefined4 *)(iVar3 + iVar4 * 4) = *puVar5;
          CVGuiScreen::SetActive(this_00,true);
          return;
        }
      }
    }
    this_00 = (CVGuiScreen *)
              CGlobalEntityList::FindEntityByClassname
                        ((CGlobalEntityList *)gEntList,(CBaseEntity *)this_00,"vgui_screen");
  } while( true );
}

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)