L L4D2node

CSceneListManager::Activate

0x00818610 · 503 bytes · __thiscall

_ZN17CSceneListManager8ActivateEv

Decompiled

undefined (1 param)

/* CSceneListManager::Activate() */

void __thiscall CSceneListManager::Activate(CSceneListManager *this)

{
  uint uVar1;
  int iVar2;
  uint *puVar3;
  undefined4 uVar4;
  int *piVar5;
  CSceneEntity *this_00;
  CSceneListManager *this_01;
  undefined *puVar6;
  undefined1 *puVar7;
  CSceneListManager *pCVar8;
  int iVar9;
  undefined1 *puVar10;
  
  iVar9 = 0;
  CBaseEntity::Activate((CBaseEntity *)this);
  pCVar8 = this + 0x494;
  if (*(int *)(gpGlobals + 0x48) != 1) {
    do {
      while (*(char **)(pCVar8 + -0x40) != (char *)0x0) {
        piVar5 = (int *)CGlobalEntityList::FindEntityByName
                                  ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,
                                   *(char **)(pCVar8 + -0x40),(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                                   (CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
        if (piVar5 == (int *)0x0) {
          *(uint *)pCVar8 = 0xffffffff;
LAB_0081867f:
          puVar10 = &DAT_00d539c2;
          if (*(undefined1 **)(pCVar8 + -0x40) != (undefined1 *)0x0) {
            puVar10 = *(undefined1 **)(pCVar8 + -0x40);
          }
          puVar7 = &DAT_00d539c2;
          if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
            puVar7 = *(undefined1 **)(this + 0x7c);
          }
          uVar4 = CBaseEntity::GetDebugName((CBaseEntity *)this);
          Warning("%s(%s) could not find scene %d, named %s\n",uVar4,puVar7,iVar9,puVar10);
          break;
        }
        puVar3 = (uint *)(**(code **)(*piVar5 + 0xc))(piVar5);
        uVar1 = *puVar3;
        *(uint *)pCVar8 = uVar1;
        if ((((uVar1 == 0xffffffff) ||
             (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) ||
           (iVar2 = *(int *)(puVar6 + 4), iVar2 == 0)) goto LAB_0081867f;
        this_00 = (CSceneEntity *)
                  __dynamic_cast(iVar2,&CBaseEntity::typeinfo,&CSceneEntity::typeinfo,0);
        if (this_00 == (CSceneEntity *)0x0) {
          this_01 = (CSceneListManager *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&typeinfo,0);
          if (this_01 == (CSceneListManager *)0x0) {
            puVar10 = &DAT_00d539c2;
            if (*(undefined1 **)(pCVar8 + -0x40) != (undefined1 *)0x0) {
              puVar10 = *(undefined1 **)(pCVar8 + -0x40);
            }
            puVar7 = &DAT_00d539c2;
            if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
              puVar7 = *(undefined1 **)(this + 0x7c);
            }
            uVar4 = CBaseEntity::GetDebugName((CBaseEntity *)this);
            Warning("%s(%s) found an entity that wasn\'t a logic_choreographed_scene or logic_scene_list_manager in slot %d, named %s\n"
                    ,uVar4,puVar7,iVar9,puVar10);
            *(uint *)pCVar8 = 0xffffffff;
          }
          else {
            AddListManager(this_01,this);
          }
          break;
        }
        iVar9 = iVar9 + 1;
        pCVar8 = pCVar8 + 4;
        CSceneEntity::AddListManager(this_00,this);
        if (iVar9 == 0x10) {
          return;
        }
      }
      iVar9 = iVar9 + 1;
      pCVar8 = pCVar8 + 4;
    } while (iVar9 != 0x10);
  }
  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)