L L4D2node

CSceneCache::PrecacheSceneEvent

0x004ae0d0 · 280 bytes · __cdecl

_ZN11CSceneCache18PrecacheSceneEventEP12CChoreoEventR10CUtlVectorIt10CUtlMemoryItiEE

Decompiled

undefined (2 params)

/* CSceneCache::PrecacheSceneEvent(CChoreoEvent*, CUtlVector<unsigned short, CUtlMemory<unsigned
   short, int> >&) */

void CSceneCache::PrecacheSceneEvent(CChoreoEvent *param_1,CUtlVector *param_2)

{
  code *pcVar1;
  int iVar2;
  char cVar3;
  ushort uVar4;
  int iVar5;
  undefined4 uVar6;
  int in_GS_OFFSET;
  ushort local_62;
  char local_60 [64];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((param_1 != (CChoreoEvent *)0x0) && (iVar5 = CChoreoEvent::GetType(param_1), iVar5 == 5)) {
    pcVar1 = *(code **)(*soundemitterbase + 0x1c);
    uVar6 = CChoreoEvent::GetParameters(param_1);
    iVar5 = (*pcVar1)(soundemitterbase,uVar6);
    if (iVar5 != -1) {
      local_62 = (ushort)iVar5;
      CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>>::InsertBefore
                ((CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>> *)param_2,
                 *(int *)(param_2 + 0xc),&local_62);
    }
    iVar5 = CChoreoEvent::GetCloseCaptionType(param_1);
    if (iVar5 == 0) {
      cVar3 = CChoreoEvent::GetPlaybackCloseCaptionToken(param_1,local_60,0x40);
      if ((cVar3 != '\0') &&
         (iVar5 = (**(code **)(*soundemitterbase + 0x1c))(soundemitterbase,local_60), iVar5 != -1))
      {
        iVar2 = *(int *)(param_2 + 0xc);
        uVar4 = (ushort)iVar5;
        if (0 < iVar2) {
          if (uVar4 == **(ushort **)param_2) goto LAB_004ae0fb;
          iVar5 = 0;
          do {
            iVar5 = iVar5 + 1;
            if (iVar5 == iVar2) goto LAB_004ae1c5;
          } while (uVar4 != (*(ushort **)param_2)[iVar5]);
          if (iVar5 != -1) goto LAB_004ae0fb;
        }
LAB_004ae1c5:
        local_62 = uVar4;
        CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>>::InsertBefore
                  ((CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>> *)param_2,iVar2,
                   &local_62);
      }
    }
  }
LAB_004ae0fb:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)