L L4D2node

CSceneListManager::RemoveScene

0x00814f10 · 177 bytes · __thiscall

_ZN17CSceneListManager11RemoveSceneEi

Decompiled

undefined (2 params)

/* CSceneListManager::RemoveScene(int) */

void __thiscall CSceneListManager::RemoveScene(CSceneListManager *this,int param_1)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  CSceneListManager *this_00;
  undefined *puVar3;
  
  uVar1 = *(uint *)(this + param_1 * 4 + 0x494);
  if ((((uVar1 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar3 + 4) != 0)) {
    pCVar2 = (CBaseEntity *)
             __dynamic_cast(*(int *)(puVar3 + 4),&CBaseEntity::typeinfo,&CSceneEntity::typeinfo,0);
    if (pCVar2 != (CBaseEntity *)0x0) {
      UTIL_Remove(pCVar2);
      return;
    }
    if (*(int *)(puVar3 + 4) != 0) {
      this_00 = (CSceneListManager *)
                __dynamic_cast(*(int *)(puVar3 + 4),&CBaseEntity::typeinfo,&typeinfo,0);
      if (this_00 != (CSceneListManager *)0x0) {
        ShutdownList(this_00);
        return;
      }
    }
  }
  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)