L L4D2node

CChangeLevel::ChangelevelThink

0x00b222a0 · 304 bytes · __thiscall

_ZN12CChangeLevel16ChangelevelThinkEv

Decompiled

undefined (1 param)

/* CChangeLevel::ChangelevelThink() */

void __thiscall CChangeLevel::ChangelevelThink(CChangeLevel *this)

{
  int iVar1;
  uint uVar2;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  CBaseEntity *this_00;
  int iVar6;
  ChangelevelPlayerCollector local_24;
  char local_23;
  char local_22;
  CChangeLevel *local_20;
  
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
  local_20 = this;
  local_24 = (ChangelevelPlayerCollector)0x0;
  local_23 = '\0';
  local_22 = '\0';
  ForEachPlayer<ChangelevelPlayerCollector>(&local_24);
  if (((local_22 != '\0') && (local_23 == '\0')) && (local_24 == (ChangelevelPlayerCollector)0x0)) {
    iVar1 = *(int *)(this + 0x560);
    iVar6 = 0;
    if (0 < iVar1) {
      do {
        this_00 = (CBaseEntity *)0x0;
        uVar2 = *(uint *)(*(int *)(this + 0x554) + iVar6 * 4);
        if (((uVar2 != 0xffffffff) &&
            (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
          this_00 = *(CBaseEntity **)(puVar5 + 4);
        }
        if (((*(char **)(this_00 + 0x7c) == "func_door*") ||
            (cVar3 = CBaseEntity::ClassMatchesComplex(this_00,"func_door*"), cVar3 != '\0')) &&
           ((iVar4 = __dynamic_cast(this_00,&CBaseEntity::typeinfo,&CBaseDoor::typeinfo,0),
            iVar4 != 0 && (*(int *)(iVar4 + 0x440) != 1)))) {
          return;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 != iVar1);
    }
    ChangeLevelNow(this,(CBaseEntity *)0x0);
  }
  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)