L L4D2node

VOX_LookupGlobalSeqVirtual

0x000f19f0 · 278 bytes · __cdecl

_Z26VOX_LookupGlobalSeqVirtualiiPci

Decompiled

undefined (4 params)

/* VOX_LookupGlobalSeqVirtual(int, int, char*, int) */

void VOX_LookupGlobalSeqVirtual(int param_1,int param_2,char *param_3,int param_4)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  longdouble lVar5;
  int local_20 [4];
  
  iVar4 = 0;
  lVar5 = (longdouble)(**(code **)(*g_pSoundServices + 0xc))(g_pSoundServices);
  piVar1 = &g_entnames;
  do {
    if (*piVar1 == param_1) {
      iVar3 = iVar4 * 0x1a + param_4;
      if ((float)lVar5 - (float)(&DAT_0034ea34)[iVar3] <=
          (float)(*(int *)(snd_vox_seqtimeout._28_4_ + 0x30) / 2)) {
        iVar3 = (&DAT_0034ea14)[iVar3];
      }
      else {
        (&DAT_0034ea14)[iVar3] = 0;
        iVar3 = 0;
      }
      goto LAB_000f1a72;
    }
    iVar4 = iVar4 + 1;
    piVar1 = piVar1 + 0x1a;
  } while (iVar4 != 0x40);
  iVar4 = VOX_LookupEntIndex(param_1,param_2,true);
  iVar3 = (&DAT_0034e9e4)[param_4 + 0xc + iVar4 * 0x1a];
LAB_000f1a72:
  local_20[0] = 0;
  uVar2 = VOX_LookupSentenceByIndex(param_3,iVar3,local_20);
  iVar4 = param_4 + iVar4 * 0x1a;
  (&DAT_0034ea14)[iVar4] = local_20[0];
  (&DAT_0034ea34)[iVar4] = (float)lVar5;
  *(undefined4 *)(&DAT_0034ea00 + iVar4 * 4) = uVar2;
  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)