CAISound::InputInsertSound
0x0082c9c0 · 320 bytes · __thiscall
_ZN8CAISound16InputInsertSoundER11inputdata_t
Decompiled
undefined (2 params)
/* CAISound::InputInsertSound(inputdata_t&) */
void __thiscall CAISound::InputInsertSound(CAISound *this,inputdata_t *param_1)
{
CBaseEntity *this_00;
undefined1 *puVar1;
int iVar2;
undefined4 local_18;
undefined4 local_14;
undefined4 local_10;
iVar2 = 0;
if (*(int *)(param_1 + 0x18) == 5) {
iVar2 = *(int *)(param_1 + 8);
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_18 = *(undefined4 *)(this + 0x2e0);
local_14 = *(undefined4 *)(this + 0x2e4);
local_10 = *(undefined4 *)(this + 0x2e8);
if (*(char **)(this + 0x450) != (char *)0x0) {
this_00 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,*(char **)(this + 0x450),
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if (this_00 == (CBaseEntity *)0x0) {
puVar1 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x450) != (undefined1 *)0x0) {
puVar1 = *(undefined1 **)(this + 0x450);
}
DevWarning("Warning- ai_sound cannot find proxy entity named \'%s\'. Using self.\n",puVar1);
}
else {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_18 = *(undefined4 *)(this_00 + 0x2e0);
local_14 = *(undefined4 *)(this_00 + 0x2e4);
local_10 = *(undefined4 *)(this_00 + 0x2e8);
}
}
CSoundEnt::InsertSound
(*(int *)(this + 0x440),(Vector *)&local_18,iVar2,*(float *)(this + 0x44c),
(CBaseEntity *)this,0,(CBaseEntity *)0x0);
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.