CSoundControllerImp::ProcessCommand
0x004bf8b0 · 270 bytes · __thiscall
_ZN19CSoundControllerImp14ProcessCommandEP14SoundCommand_t
Decompiled
undefined (2 params)
/* CSoundControllerImp::ProcessCommand(SoundCommand_t*) */
void __thiscall
CSoundControllerImp::ProcessCommand(CSoundControllerImp *this,SoundCommand_t *param_1)
{
uint *puVar1;
CSoundEnvelope *pCVar2;
float fVar3;
int iVar4;
void *pvVar5;
CSoundEnvelope *this_00;
float fVar6;
iVar4 = *(int *)(param_1 + 0xc);
if (iVar4 == 1) {
this_00 = *(CSoundEnvelope **)param_1;
fVar6 = *(float *)(param_1 + 8);
fVar3 = *(float *)(param_1 + 0x10);
pCVar2 = this_00 + 0x50;
*(uint *)pCVar2 = *(uint *)pCVar2 | 2;
CSoundEnvelope::SetTarget(this_00,fVar3,fVar6);
return;
}
if (iVar4 < 2) {
if (iVar4 == 0) {
iVar4 = *(int *)param_1;
fVar6 = *(float *)(param_1 + 0x10);
fVar3 = *(float *)(param_1 + 8);
if (1.0 <= fVar6) {
fVar6 = 1.0;
}
puVar1 = (uint *)(iVar4 + 0x50);
*puVar1 = *puVar1 | 1;
CSoundEnvelope::SetTarget((CSoundEnvelope *)(iVar4 + 0x10),fVar6,fVar3);
return;
}
}
else if (iVar4 == 2) {
if (*(int *)(*(int *)param_1 + 0x58) != 0) {
CSoundPatch::Shutdown((CSoundPatch *)this);
return;
}
}
else if (iVar4 == 3) {
RemoveFromList(this,*(CSoundPatch **)param_1);
pvVar5 = *(void **)param_1;
if (pvVar5 != (void *)0x0) {
*(undefined ***)((int)pvVar5 + 0x60) = &PTR__CCopyRecipientFilter_00c1e5c8;
CSoundPatch::g_SoundPatchCount = CSoundPatch::g_SoundPatchCount + -1;
*(undefined4 *)((int)pvVar5 + 0x74) = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)((int)pvVar5 + 0x68));
*(undefined4 *)((int)pvVar5 + 0x78) = *(undefined4 *)((int)pvVar5 + 0x68);
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)((int)pvVar5 + 0x68));
*(undefined ***)((int)pvVar5 + 0x60) = &PTR__IRecipientFilter_00c1e548;
CUtlMemoryPool::Free((CUtlMemoryPool *)CSoundPatch::s_Allocator,pvVar5);
}
*(undefined4 *)param_1 = 0;
}
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.