CBaseServerVehicle::PlayLoopingSound
0x00b3a3d0 · 619 bytes · __thiscall
_ZN18CBaseServerVehicle16PlayLoopingSoundEPKc
Decompiled
undefined (2 params)
/* CBaseServerVehicle::PlayLoopingSound(char const*) */
void __thiscall CBaseServerVehicle::PlayLoopingSound(CBaseServerVehicle *this,char *param_1)
{
int iVar1;
code *pcVar2;
int **ppiVar3;
int *piVar4;
char **ppcVar5;
int **ppiVar6;
int *piVar7;
int *piVar8;
char *pcVar9;
int *local_8c;
char **local_88;
char *local_50 [2];
Vector local_48 [12];
undefined **local_3c [11];
piVar4 = (int *)CSoundEnvelopeController::GetController();
piVar8 = *(int **)(this + 0x2c);
(**(code **)(*piVar8 + 0x28c))();
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 00b3a417 to 00b3a41b has its CatchHandler @ 00b3a665 */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_3c,local_48);
local_3c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
/* try { // try from 00b3a42c to 00b3a44b has its CatchHandler @ 00b3a663 */
(**(code **)(*piVar8 + 0x28c))();
local_88 = (char **)0xb3a44c;
CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_3c,local_48,0.8);
if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
ppcVar5 = (char **)0x0;
ppiVar3 = (int **)&stack0xffffff7c;
}
else {
/* try { // try from 00b3a4b2 to 00b3a4e1 has its CatchHandler @ 00b3a647 */
local_88 = (char **)0xb3a4b4;
ppcVar5 = (char **)(**(code **)(*piVar4 + 0x1c))();
ppiVar3 = (int **)&stack0xffffff7c;
if ((*(int *)(this + 0x18c) != 0) &&
(ppiVar3 = (int **)&stack0xffffff7c, ppcVar5 != (char **)0x0)) {
local_88 = (char **)0xb3a4e2;
(**(code **)(*piVar4 + 0x50))();
pcVar9 = local_50[0];
/* try { // try from 00b3a4f8 to 00b3a4fa has its CatchHandler @ 00b3a669 */
local_8c = (int *)0xb3a4fb;
local_88 = local_50;
(**(code **)(*piVar4 + 0x50))();
ppiVar6 = &local_8c;
ppiVar3 = &local_8c;
if (local_50[0] == pcVar9) {
/* try { // try from 00b3a513 to 00b3a628 has its CatchHandler @ 00b3a647 */
local_8c = piVar4;
local_88 = ppcVar5;
(**(code **)(*piVar4 + 0x2c))();
ppcVar5 = *(char ***)(this + 0x18c);
local_8c = piVar4;
local_88 = ppcVar5;
(**(code **)(*piVar4 + 0x34))();
*(undefined4 *)(this + 0x18c) = 0;
goto LAB_00b3a548;
}
}
}
ppiVar6 = ppiVar3;
if (*(int *)(g_debug_vehiclesound._28_4_ + 0x30) == 0) goto LAB_00b3a548;
if (*(int *)(this + 0x18c) == 0) {
pcVar9 = "NULL";
piVar8 = (int *)ppiVar6;
if (ppcVar5 == (char **)0x0) goto LAB_00b3a639;
LAB_00b3a5f2:
iVar1 = *piVar4;
piVar8[2] = (int)ppcVar5;
piVar8[1] = (int)piVar4;
*piVar8 = (int)local_50;
pcVar2 = *(code **)(iVar1 + 0x50);
piVar8[-1] = 0xb3a605;
(*pcVar2)();
ppiVar6 = (int **)(piVar8 + -1);
if (local_50[0] == (char *)0x0) {
local_50[0] = "";
ppiVar6 = (int **)(piVar8 + -1);
}
}
else {
iVar1 = *piVar4;
ppiVar6[2] = (int *)*(int *)(this + 0x18c);
ppiVar6[1] = piVar4;
*ppiVar6 = (int *)local_50;
pcVar2 = *(code **)(iVar1 + 0x50);
ppiVar6[-1] = (int *)0xb3a5de;
(*pcVar2)();
piVar7 = (int *)(ppiVar6 + -1);
ppiVar6 = ppiVar6 + -1;
pcVar9 = local_50[0];
if (local_50[0] == (char *)0x0) {
pcVar9 = "";
}
piVar8 = piVar7;
if (ppcVar5 != (char **)0x0) goto LAB_00b3a5f2;
LAB_00b3a639:
local_50[0] = "NULL";
}
ppiVar6[2] = (int *)local_50[0];
ppiVar6[1] = (int *)pcVar9;
*ppiVar6 = (int *)"Stop %s, start %s\n";
ppiVar6[-1] = (int *)0xb3a629;
Msg();
LAB_00b3a548:
ppiVar6[1] = (int *)0x3e800000;
*ppiVar6 = (int *)this;
ppiVar6[-1] = (int *)0xb3a55b;
StopLoopingSound((CBaseServerVehicle *)*ppiVar6,(float)ppiVar6[1]);
*(char ***)(this + 0x18c) = ppcVar5;
if (ppcVar5 != (char **)0x0) {
iVar1 = *piVar4;
ppiVar6[4] = (int *)0x0;
ppiVar6[3] = (int *)0x42c80000;
ppiVar6[2] = (int *)0x3f800000;
ppiVar6[1] = (int *)ppcVar5;
*ppiVar6 = piVar4;
pcVar2 = *(code **)(iVar1 + 8);
ppiVar6[-1] = (int *)0xb3a58c;
(*pcVar2)();
}
local_3c[0] = &PTR__CPASFilter_00bfaf28;
*ppiVar6 = (int *)local_3c;
ppiVar6[-1] = (int *)0xb3a59e;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)*ppiVar6);
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.