CEngineSoundServer::EmitSound
0x00157500 · 582 bytes · __thiscall
_ZN18CEngineSoundServer9EmitSoundER16IRecipientFilteriiPKcffiiPK6VectorS6_P10CUtlVectorIS4_10CUtlMemoryIS4_iEEbfi
Decompiled
undefined (15 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEngineSoundServer::EmitSound(IRecipientFilter&, int, int, char const*, float, float, int, int,
Vector const*, Vector const*, CUtlVector<Vector, CUtlMemory<Vector, int> >*, bool, float, int) */
void __thiscall
CEngineSoundServer::EmitSound
(CEngineSoundServer *this,IRecipientFilter *param_1,int param_2,int param_3,char *param_4,
float param_5,float param_6,int param_7,int param_8,Vector *param_9,Vector *param_10,
CUtlVector *param_11,bool param_12,float param_13,int param_14)
{
char cVar1;
int iVar2;
int iVar3;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_exit == 0) {
local_20 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_34,0,0,0,0,"/data/src/engine/./enginesoundserver.cpp",0x130,
&EmitSound(IRecipientFilter&,int,int,char_const*,float,float,int,int,Vector_const*,Vector_const*,CUtlVector<Vector,CUtlMemory<Vector,int>>*,bool,float,int)
::tm_fmt,"(%s)%s","Unaccounted","CEngineSoundServer::EmitSound");
local_20 = _exit;
}
iVar3 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
/* try { // try from 001576e6 to 00157734 has its CatchHandler @ 00157774 */
iVar2 = ThreadGetCurrentId();
if (iVar3 == iVar2) {
if ((char *)*_DAT_0040b030 != "CEngineSoundServer::EmitSound") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2ae8ad,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
}
iVar3 = 0;
if (param_6 != 0.0) {
iVar3 = (int)(20.0 / param_6 + 50.0);
}
/* try { // try from 00157650 to 00157651 has its CatchHandler @ 00157753 */
(**(code **)(*(int *)this + 0x18))
(this,param_1,param_2,param_3,param_4,param_5,iVar3,param_7,param_8,param_9,param_10,
param_11,param_12,param_13,param_14);
iVar3 = _DAT_0040b9d4;
if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
iVar2 = ThreadGetCurrentId();
if (iVar3 == iVar2) {
cVar1 = CVProfNode::ExitScope();
if (cVar1 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.