L L4D2node

CBaseEntity::GetSoundDuration

0x004b2c80 · 208 bytes · __cdecl

_ZN11CBaseEntity16GetSoundDurationEPKcS1_

Decompiled

undefined (2 params)

/* CBaseEntity::GetSoundDuration(char const*, char const*) */

void CBaseEntity::GetSoundDuration(char *param_1,char *param_2)

{
  char cVar1;
  code *UNRECOVERED_JUMPTABLE;
  int iVar2;
  
  UNRECOVERED_JUMPTABLE = *(code **)(*enginesound + 0x10);
  iVar2 = V_stristr(param_1,".wav");
  if (iVar2 == 0) {
    iVar2 = V_stristr(param_1,".mp3");
    if (iVar2 == 0) {
      param_1 = (char *)(**(code **)(*soundemitterbase + 0x3c))(soundemitterbase,param_1,param_2);
      goto LAB_004b2cd8;
    }
  }
  iVar2 = V_stristr(param_1,".wav");
  if (iVar2 != 0) {
    WaveTrace(param_1,"UTIL_TranslateSoundName");
  }
LAB_004b2cd8:
  for (; (((cVar1 = *param_1, cVar1 == '!' || ((byte)(cVar1 - 0x23U) < 2)) ||
          ((byte)(cVar1 - 0x28U) < 3)) ||
         ((((byte)(cVar1 - 0x3eU) < 3 || (cVar1 == '<')) || ((cVar1 == '^' || (cVar1 == '}'))))));
      param_1 = param_1 + 1) {
  }
                    /* WARNING: Could not recover jumptable at 0x004b2d18. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (*UNRECOVERED_JUMPTABLE)();
  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)