L L4D2node

CSceneEntity::UnloadScene

0x00812ff0 · 154 bytes · __thiscall

_ZN12CSceneEntity11UnloadSceneEv

Decompiled

undefined (1 param)

/* CSceneEntity::UnloadScene() */

void __thiscall CSceneEntity::UnloadScene(CSceneEntity *this)

{
  CChoreoScene *pCVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  if (*(CChoreoScene **)(this + 0x4f0) != (CChoreoScene *)0x0) {
    uVar4 = 0;
    iVar3 = 0;
    ClearSceneEvents(this,*(CChoreoScene **)(this + 0x4f0),false);
    while( true ) {
      iVar2 = CChoreoScene::GetNumActors(*(CChoreoScene **)(this + 0x4f0));
      if (iVar2 <= iVar3) break;
      pCVar1 = (CChoreoScene *)(**(code **)(*(int *)this + 0x3dc))(this,iVar3,uVar4);
      if (pCVar1 != (CChoreoScene *)0x0) {
        uVar4 = 0;
        CBaseFlex::RemoveChoreoScene(pCVar1,SUB41(*(undefined4 *)(this + 0x4f0),0));
      }
      iVar3 = iVar3 + 1;
    }
    pCVar1 = *(CChoreoScene **)(this + 0x4f0);
    if (pCVar1 != (CChoreoScene *)0x0) {
      CChoreoScene::~CChoreoScene(pCVar1);
      operator_delete(pCVar1);
    }
  }
  *(undefined4 *)(this + 0x4f0) = 0;
  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)