L L4D2node

CSceneCache::Rebuild

0x004ae200 · 185 bytes · __thiscall

_ZN11CSceneCache7RebuildEPKc

Decompiled

undefined (2 params)

/* CSceneCache::Rebuild(char const*) */

void __thiscall CSceneCache::Rebuild(CSceneCache *this,char *param_1)

{
  CChoreoScene *this_00;
  int iVar1;
  CChoreoEvent *pCVar2;
  int iVar3;
  int iVar4;
  longdouble lVar5;
  
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 0x14) = 0;
  this_00 = (CChoreoScene *)BlockingLoadScene(param_1);
  if (this_00 != (CChoreoScene *)0x0) {
    iVar1 = CChoreoScene::GetNumEvents(this_00);
    if (0 < iVar1) {
      iVar3 = 0;
      do {
        iVar4 = iVar3 + 1;
        pCVar2 = (CChoreoEvent *)CChoreoScene::GetEvent(this_00,iVar3);
        PrecacheSceneEvent(pCVar2,(CUtlVector *)(this + 8));
        iVar3 = iVar4;
      } while (iVar4 != iVar1);
    }
    lVar5 = (longdouble)CChoreoScene::FindStopTime(this_00);
    *(int *)(this + 4) = (int)((float)lVar5 * 1000.0 + 0.5);
    CChoreoScene::~CChoreoScene(this_00);
    operator_delete(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)