L L4D2node

CChangeLevel::ChangeList

0x00b21ee0 · 426 bytes · __cdecl

_ZN12CChangeLevel10ChangeListEP11levellist_ti

Decompiled

undefined (2 params)

/* CChangeLevel::ChangeList(levellist_t*, int) */

int CChangeLevel::ChangeList(levellist_t *param_1,int param_2)

{
  CSaveRestoreData *pCVar1;
  int *piVar2;
  int iVar3;
  byte *pbVar4;
  CBaseEntity *pCVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  levellist_t *local_105c;
  int local_1058;
  undefined **local_1044;
  undefined4 local_1040 [3];
  undefined4 local_1034;
  undefined4 local_1030;
  CBaseEntity *local_101c [512];
  uint local_81c [515];
  
  iVar3 = BuildChangeLevelList(param_1,param_2);
  pCVar1 = *(CSaveRestoreData **)(gpGlobals + 0x2c);
  if ((pCVar1 != (CSaveRestoreData *)0x0) && (*(int *)(pCVar1 + 0x574) != 0)) {
    CSave::CSave((CSave *)&local_1044,pCVar1);
    if (0 < iVar3) {
      local_1058 = 0;
      local_105c = param_1 + 0x20;
      do {
        pbVar4 = *(byte **)(local_105c + 0x20);
        if (((pbVar4 == (byte *)0x0) &&
            ((pbVar4 = *(byte **)(gpGlobals + 0x58), pbVar4 == (byte *)0x0 || ((*pbVar4 & 2) != 0)))
            ) || (piVar2 = *(int **)(pbVar4 + 0xc), piVar2 == (int *)0x0)) {
          pCVar5 = (CBaseEntity *)0x0;
        }
        else {
                    /* try { // try from 00b21f81 to 00b21ffb has its CatchHandler @ 00b2208a */
          pCVar5 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2);
        }
        iVar6 = BuildEntityTransitionList
                          (pCVar5,(char *)local_105c,local_101c,(int *)local_81c,0x200);
        iVar8 = 0;
        if (0 < iVar6) {
          do {
            iVar7 = CSave::EntityIndex((CSave *)&local_1044,local_101c[iVar8]);
            CSave::EntityFlagsSet
                      ((CSave *)&local_1044,iVar7,1 << ((byte)local_1058 & 0x1f) | local_81c[iVar8])
            ;
            iVar8 = iVar8 + 1;
          } while (iVar8 != iVar6);
        }
        local_1058 = local_1058 + 1;
        local_105c = local_105c + 0x50;
      } while (local_1058 != iVar3);
    }
    local_1044 = &PTR_StartLogging_00c1cf28;
    local_1034 = 0;
    CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_1040);
    local_1030 = local_1040[0];
    CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)local_1040);
  }
  return iVar3;
}

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)