L L4D2node

CChangeLevel::BuildChangeLevelList

0x00b18d60 · 220 bytes · __cdecl

_ZN12CChangeLevel20BuildChangeLevelListEP11levellist_ti

Decompiled

undefined (2 params)

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

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

{
  CBaseEntity *pCVar1;
  int iVar2;
  int iVar3;
  int local_20;
  
  pCVar1 = (CBaseEntity *)
           CGlobalEntityList::FindEntityByClassname
                     ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"info_changelevel");
  local_20 = 0;
  do {
    if (pCVar1 == (CBaseEntity *)0x0) {
      return local_20;
    }
    iVar2 = __dynamic_cast(pCVar1,&CBaseEntity::typeinfo,&typeinfo,0);
    if (iVar2 != 0) {
      iVar3 = FindLandmark((char *)(iVar2 + 0x589));
      if (((iVar3 != 0) &&
          (iVar2 = AddTransitionToList(param_1,local_20,(char *)(iVar2 + 0x569),
                                       (char *)(iVar2 + 0x589),*(edict_t **)(iVar3 + 0x30)),
          iVar2 != 0)) && (local_20 = local_20 + 1, param_2 <= local_20)) {
        return local_20;
      }
    }
    pCVar1 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassname
                       ((CGlobalEntityList *)gEntList,pCVar1,"info_changelevel");
  } 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)