L L4D2node

SENTENCEG_PlaySequentialSz

0x0082b430 · 575 bytes · __cdecl

_Z26SENTENCEG_PlaySequentialSzP7edict_tPKcf12soundlevel_tiiii

Decompiled

undefined (8 params)

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

undefined4 SENTENCEG_PlaySequentialSz(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 (((-1 < iVar1) && (iVar1 = (**(code **)(*engine + 0x7c))(), -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 0082b533 to 0082b537 has its CatchHandler @ 0082b67c */
      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 0082b562 to 0082b584 has its CatchHandler @ 0082b68e */
      (**(code **)(*piVar2 + 0x28c))();
      puVar3 = &stack0xffffff2c;
      CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,local_8c,local_98);
                    /* try { // try from 0082b5ff to 0082b603 has its CatchHandler @ 0082b6a7 */
      CBaseEntity::EmitSentenceByIndex();
      local_80[0] = &PTR__CPASFilter_00bfaf28;
      CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
      goto LAB_0082b613;
    }
  }
  local_94 = 0xffffffff;
LAB_0082b613:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_94;
  }
                    /* WARNING: Subroutine does not return */
  *(undefined1 **)(puVar3 + -4) = &LAB_0082b67c;
  __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)