L L4D2node

CSound::GetSoundReactOrigin

0x0082c250 · 191 bytes · __thiscall

_ZN6CSound19GetSoundReactOriginEv

Decompiled

undefined (1 param)

/* CSound::GetSoundReactOrigin() */

CBaseEntity * __thiscall CSound::GetSoundReactOrigin(CSound *this)

{
  uint uVar1;
  uint uVar2;
  CBaseEntity *pCVar3;
  undefined *puVar4;
  
  uVar1 = *(uint *)(this + 0x10);
  if ((uVar1 != 0x10) && (uVar1 != 0x400)) {
    if ((((uVar1 & 0x1000000) != 0) &&
        (((uVar2 = *(uint *)this, uVar2 != 0xffffffff &&
          (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)))) &&
       (pCVar3 = *(CBaseEntity **)(puVar4 + 4), pCVar3 != (CBaseEntity *)0x0)) goto LAB_0082c2ef;
    if ((uVar1 & 0x100008) != 0x100008) goto LAB_0082c2d3;
  }
  uVar1 = *(uint *)this;
  if (((uVar1 == 0xffffffff) ||
      (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
     ((*(uint *)(puVar4 + 8) != uVar1 >> 0xc ||
      (pCVar3 = *(CBaseEntity **)(puVar4 + 4), pCVar3 == (CBaseEntity *)0x0)))) {
LAB_0082c2d3:
    pCVar3 = (CBaseEntity *)GetSoundOrigin(this);
    return pCVar3;
  }
LAB_0082c2ef:
  if (((byte)pCVar3[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(pCVar3);
  }
  return pCVar3 + 0x2e0;
}

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)