L L4D2node

UTIL_EmitGroupnameSuit

0x0082b930 · 337 bytes · __cdecl

_Z22UTIL_EmitGroupnameSuitP7edict_tPKc

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* UTIL_EmitGroupnameSuit(edict_t*, char const*) */

undefined4 UTIL_EmitGroupnameSuit(edict_t *param_1,char *param_2)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  undefined *puVar4;
  int iVar5;
  int local_24;
  float local_20;
  
  iVar5 = 100;
  local_20 = *(float *)(suitvolume._28_4_ + 0x2c);
  iVar2 = (**(code **)(*random_valve + 8))(random_valve,0,1);
  if (iVar2 != 0) {
    iVar5 = (**(code **)(*random_valve + 8))(random_valve,0,6);
    iVar5 = iVar5 + 0x62;
  }
  if (param_1 == (edict_t *)0x0) {
    iVar2 = 0;
  }
  else {
    piVar1 = *(int **)(param_1 + 0xc);
    iVar2 = 0;
    if (piVar1 != (int *)0x0) {
      iVar2 = (**(code **)(*piVar1 + 0x18))(piVar1);
    }
  }
  if (*(float *)(gpGlobals + 0xc) <= g_AIFriendliesTalkSemaphore) {
    local_24 = 0;
    if (((_DAT_00fbc734 != 0xffffffff) &&
        (puVar4 = g_pEntityList + (_DAT_00fbc734 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)
        ) && (*(uint *)(puVar4 + 8) == _DAT_00fbc734 >> 0xc)) {
      local_24 = *(int *)(puVar4 + 4);
    }
    if (iVar2 != local_24) {
      local_20 = local_20 * 0.3;
    }
  }
  if (local_20 <= 0.05) {
    uVar3 = 0xffffffff;
  }
  else {
    uVar3 = SENTENCEG_PlayRndSz(param_1,param_2,local_20,0x4b,0,iVar5);
  }
  return uVar3;
}

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)