L L4D2node

CSceneEntity::PrefetchSpeakEventSounds

0x008159b0 · 362 bytes · __thiscall

_ZN12CSceneEntity24PrefetchSpeakEventSoundsER15CUtlSymbolTableR10CUtlRBTreeINS_17SpeakEventSound_tEtPFbRKS3_S5_E10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE

Decompiled

undefined (3 params)

/* CSceneEntity::PrefetchSpeakEventSounds(CUtlSymbolTable&,
   CUtlRBTree<CSceneEntity::SpeakEventSound_t, unsigned short, bool
   (*)(CSceneEntity::SpeakEventSound_t const&, CSceneEntity::SpeakEventSound_t const&),
   CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t, unsigned short>, unsigned short> >&)
    */

void __thiscall
CSceneEntity::PrefetchSpeakEventSounds
          (CSceneEntity *this,CUtlSymbolTable *param_1,CUtlRBTree *param_2)

{
  short sVar1;
  ushort *puVar2;
  int iVar3;
  char *pcVar4;
  uint uVar5;
  ushort uVar6;
  undefined2 local_1e [7];
  
  uVar6 = *(ushort *)(param_2 + 0x10);
  do {
    if ((CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
         ::Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar3 = __cxa_guard_acquire(&CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                                     ::Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
      ::Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f57f2e = 0xffff;
      DAT_00f57f30 = 0xffff;
      __cxa_guard_release(&CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                           ::Links(unsigned_short)::s_Sentinel);
    }
    sVar1 = CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
            ::Links(unsigned_short)::s_Sentinel;
    if (uVar6 != 0xffff) {
      sVar1 = *(short *)((uint)uVar6 * 0x10 + *(int *)(param_2 + 4));
    }
    if (sVar1 == -1) {
      for (uVar5 = (uint)uVar6; uVar5 != 0xffff; uVar5 = uVar5 & 0xffff) {
        local_1e[0] = *(undefined2 *)(uVar5 * 0x10 + *(int *)(param_2 + 4) + 8);
        pcVar4 = (char *)CUtlSymbolTable::String(param_1,local_1e);
        CBaseEntity::PrefetchScriptSound(pcVar4);
        uVar5 = CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                ::NextInorder((CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                               *)param_2,(ushort)uVar5);
      }
      return;
    }
    if (CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel == '\0') {
      iVar3 = __cxa_guard_acquire(&CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                                   ::Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        DAT_00f57f2e = 0xffff;
        CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
        ::Links(unsigned_short)::s_Sentinel = -1;
        DAT_00f57f30 = 0xffff;
        __cxa_guard_release(&CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                             ::Links(unsigned_short)::s_Sentinel);
      }
      if (uVar6 == 0xffff) goto LAB_00815af1;
LAB_00815a06:
      puVar2 = (ushort *)((uint)uVar6 * 0x10 + *(int *)(param_2 + 4));
    }
    else {
      if (uVar6 != 0xffff) goto LAB_00815a06;
LAB_00815af1:
      puVar2 = (ushort *)
               &CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
                ::Links(unsigned_short)::s_Sentinel;
    }
    uVar6 = *puVar2;
  } while( true );
}

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)