L L4D2node

SENTENCEG_PlayRndSz

0x0082b1b0 · 578 bytes · __cdecl

_Z19SENTENCEG_PlayRndSzP7edict_tPKcf12soundlevel_tii

Decompiled

undefined (6 params)

/* SENTENCEG_PlayRndSz(edict_t*, char const*, float, soundlevel_t, int, int) */

undefined4 SENTENCEG_PlayRndSz(int param_1,undefined4 param_2,undefined4 param_3,int param_4)

{
  int iVar1;
  int *piVar2;
  undefined1 *puVar3;
  int in_GS_OFFSET;
  float local_98;
  undefined4 local_94;
  Vector local_8c [12];
  undefined **local_80 [8];
  char local_60;
  int local_20;
  
  puVar3 = &stack0xffffff34;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (fSentencesInit != 0) {
    local_60 = '\0';
    iVar1 = (**(code **)(*engine + 0x88))();
    if (iVar1 < 0) {
      Warning();
    }
    else {
      iVar1 = (**(code **)(*engine + 0x78))();
      if ((-1 < iVar1) && (local_60 != '\0')) {
        local_94 = (**(code **)(*engine + 0x80))();
        if ((param_1 == 0) || (*(int **)(param_1 + 0xc) == (int *)0x0)) {
          piVar2 = (int *)0x0;
        }
        else {
          piVar2 = (int *)(**(code **)(**(int **)(param_1 + 0xc) + 0x18))();
        }
        (**(code **)(*piVar2 + 0x28c))();
        CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_80);
        local_80[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 0082b2a5 to 0082b2a9 has its CatchHandler @ 0082b3fc */
        CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_80,local_8c);
        local_80[0] = &PTR__CPASAttenuationFilter_00c08ec8;
        local_98 = 4.0;
        if (0x32 < param_4) {
          local_98 = 20.0 / (float)(param_4 + -0x32);
        }
                    /* try { // try from 0082b2d4 to 0082b2f6 has its CatchHandler @ 0082b427 */
        (**(code **)(*piVar2 + 0x28c))();
        puVar3 = &stack0xffffff2c;
        CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,local_8c,local_98);
                    /* try { // try from 0082b371 to 0082b375 has its CatchHandler @ 0082b40e */
        CBaseEntity::EmitSentenceByIndex();
        local_80[0] = &PTR__CPASFilter_00bfaf28;
        CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
        goto LAB_0082b385;
      }
    }
  }
  local_94 = 0xffffffff;
LAB_0082b385:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_94;
  }
                    /* WARNING: Subroutine does not return */
  *(undefined1 **)(puVar3 + -4) = &LAB_0082b3fc;
  __stack_chk_fail();
}

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)