L L4D2node

VOX_LookupGlobalVirtual

0x000f1cc0 · 197 bytes · __cdecl

_Z23VOX_LookupGlobalVirtualiiPci

Decompiled

undefined (4 params)

/* VOX_LookupGlobalVirtual(int, int, char*, int) */

int VOX_LookupGlobalVirtual(int param_1,int param_2,char *param_3,int param_4)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  longdouble lVar4;
  
  lVar4 = (longdouble)(**(code **)(*g_pSoundServices + 0xc))(g_pSoundServices);
  piVar1 = &g_entnames;
  iVar3 = 0;
  while ((*piVar1 != param_1 ||
         ((float)*(int *)(snd_vox_globaltimeout._28_4_ + 0x30) <
          (float)lVar4 - (float)piVar1[param_4 + 0x11]))) {
    iVar3 = iVar3 + 1;
    piVar1 = piVar1 + 0x1a;
    if (iVar3 == 0x40) {
LAB_000f1d38:
      iVar3 = VOX_LookupRndVirtual(param_3);
      iVar2 = VOX_LookupEntIndex(param_1,param_2,true);
      iVar2 = param_4 + iVar2 * 0x1a;
      (&DAT_0034ea24)[iVar2] = (float)lVar4;
      (&DAT_0034e9f0)[iVar2] = iVar3;
      return iVar3;
    }
  }
  if ((&g_entnames)[param_4 + 4 + iVar3 * 0x1a] != 0) {
    return (&g_entnames)[param_4 + 4 + iVar3 * 0x1a];
  }
  goto LAB_000f1d38;
}

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)