UTIL_EmitGroupIDSuit
0x0082b7d0 · 337 bytes · __cdecl
_Z20UTIL_EmitGroupIDSuitP7edict_ti
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* UTIL_EmitGroupIDSuit(edict_t*, int) */
undefined4 UTIL_EmitGroupIDSuit(edict_t *param_1,int 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_PlayRndI(param_1,param_2,local_20,0x4b,0,iVar5);
}
return uVar3;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.