SENTENCEG_PlaySentenceIndex
0x0082b000 · 364 bytes · __cdecl
_Z27SENTENCEG_PlaySentenceIndexP7edict_tif12soundlevel_tii
Decompiled
undefined (6 params)
/* SENTENCEG_PlaySentenceIndex(edict_t*, int, float, soundlevel_t, int, int) */
void SENTENCEG_PlaySentenceIndex
(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,
undefined4 param_6)
{
int *piVar1;
int iVar2;
float local_50;
Vector local_48 [12];
undefined **local_3c [11];
if (-1 < param_2) {
if ((param_1 == 0) || (piVar1 = *(int **)(param_1 + 0xc), piVar1 == (int *)0x0)) {
piVar1 = (int *)0x0;
}
else {
piVar1 = (int *)(**(code **)(*piVar1 + 0x18))(piVar1);
}
(**(code **)(*piVar1 + 0x28c))(local_48,piVar1);
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 0082b065 to 0082b069 has its CatchHandler @ 0082b192 */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_3c,local_48);
local_3c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
local_50 = 4.0;
if (0x32 < param_4) {
local_50 = 20.0 / (float)(param_4 + -0x32);
}
/* try { // try from 0082b091 to 0082b0b0 has its CatchHandler @ 0082b190 */
(**(code **)(*piVar1 + 0x28c))(local_48,piVar1);
CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_3c,local_48,local_50);
if (param_1 == 0) {
iVar2 = 0;
}
else {
iVar2 = param_1 - *(int *)(gpGlobals + 0x58) >> 4;
}
/* try { // try from 0082b122 to 0082b126 has its CatchHandler @ 0082b177 */
CBaseEntity::EmitSentenceByIndex
((CRecipientFilter *)local_3c,iVar2,2,param_2,param_3,param_4,param_5,param_6,0,0,1,0)
;
local_3c[0] = &PTR__CPASFilter_00bfaf28;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
}
return;
}
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.