CSceneEntity::PitchShiftPlayback
0x00816580 · 654 bytes · __thiscall
_ZN12CSceneEntity18PitchShiftPlaybackEf
Decompiled
undefined (2 params)
/* CSceneEntity::PitchShiftPlayback(float) */
void __thiscall CSceneEntity::PitchShiftPlayback(CSceneEntity *this,float param_1)
{
code *pcVar1;
char cVar2;
int iVar3;
int *piVar4;
float fVar5;
float *pfVar6;
float *pfVar7;
int in_GS_OFFSET;
float afStack_1a8 [6];
int local_190;
undefined **local_184 [8];
undefined4 local_164;
undefined1 *local_160;
undefined4 local_15c;
undefined4 local_158;
undefined4 local_154;
int local_150;
undefined4 local_14c;
undefined4 local_148;
undefined4 local_144;
undefined1 local_140;
undefined1 local_13f;
undefined1 local_13e;
undefined4 local_13c;
undefined4 local_138;
undefined4 local_134;
undefined4 local_130;
undefined4 local_12c;
undefined4 local_128;
undefined2 local_124;
undefined1 local_120 [256];
int local_20;
pfVar7 = afStack_1a8 + 3;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_1 <= 0.25) {
param_1 = 0.25;
}
iVar3 = *(int *)(this + 0x4f0);
if (2.5 <= param_1) {
param_1 = 2.5;
}
*(float *)(this + 0x4a8) = param_1;
if (iVar3 != 0) {
fVar5 = 0.0;
local_190 = (int)(param_1 * 100.0);
pfVar7 = afStack_1a8 + 3;
while( true ) {
*pfVar7 = (float)iVar3;
pfVar7[-1] = 1.1883349e-38;
iVar3 = CChoreoScene::GetNumActors((CChoreoScene *)*pfVar7);
if (iVar3 <= (int)fVar5) break;
iVar3 = *(int *)this;
pfVar7[1] = fVar5;
*pfVar7 = (float)this;
pcVar1 = *(code **)(iVar3 + 0x3dc);
pfVar7[-1] = 1.1883381e-38;
piVar4 = (int *)(*pcVar1)();
pfVar6 = pfVar7;
if (piVar4 != (int *)0x0) {
pfVar7[2] = 3.58732e-43;
pfVar7[1] = (float)local_120;
*pfVar7 = (float)*(undefined4 *)(this + 0x4f0);
pfVar7[-1] = 1.1883434e-38;
cVar2 = CChoreoScene::GetPlayingSoundName
((CChoreoScene *)*pfVar7,(char *)pfVar7[1],(int)pfVar7[2]);
if (cVar2 != '\0') {
iVar3 = *piVar4;
pfVar7[1] = (float)piVar4;
*pfVar7 = (float)&local_164;
pcVar1 = *(code **)(iVar3 + 0x28c);
pfVar7[-1] = 1.1883469e-38;
(*pcVar1)();
pfVar7[-1] = (float)local_184;
pfVar7[-2] = 1.1883493e-38;
CRecipientFilter::CRecipientFilter((CRecipientFilter *)pfVar7[-1]);
local_184[0] = &PTR__CPASFilter_00bfaf28;
*pfVar7 = (float)&local_164;
pfVar7[-1] = (float)local_184;
/* try { // try from 00816675 to 00816679 has its CatchHandler @ 00816817 */
pfVar7[-2] = 1.188354e-38;
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)pfVar7[-1],(Vector *)*pfVar7);
local_184[0] = &PTR__CPASAttenuationFilter_00c08ec8;
iVar3 = *piVar4;
*pfVar7 = (float)piVar4;
pfVar7[-1] = (float)&local_164;
/* try { // try from 00816693 to 008166bb has its CatchHandler @ 00816850 */
pcVar1 = *(code **)(iVar3 + 0x28c);
pfVar7[-2] = 1.1883584e-38;
(*pcVar1)();
pfVar6 = pfVar7 + -2;
pfVar7[-1] = (float)&local_164;
*pfVar7 = 0.8;
pfVar7[-2] = (float)local_184;
pfVar7[-3] = 1.1883633e-38;
CPASAttenuationFilter::Filter
((CPASAttenuationFilter *)pfVar7[-2],(Vector *)pfVar7[-1],*pfVar7);
local_164 = 0;
local_124 = 0xffff;
local_160 = local_120;
local_15c = 0x3f800000;
local_158 = 0;
local_14c = 0;
local_148 = 0;
local_144 = 0;
local_140 = 1;
local_13f = 0;
local_13e = 0;
local_13c = 0xffffffff;
local_138 = 0;
local_134 = 0;
local_130 = 0;
local_12c = 0;
local_128 = 0;
local_150 = local_190;
local_154 = 2;
if (piVar4[0xc] == 0) {
iVar3 = 0;
}
else {
iVar3 = piVar4[0xc] - *(int *)(gpGlobals + 0x58) >> 4;
}
pfVar7[-1] = (float)iVar3;
*pfVar7 = (float)&local_164;
pfVar7[-2] = (float)local_184;
/* try { // try from 008167a5 to 008167a9 has its CatchHandler @ 00816834 */
pfVar7[-3] = 1.1883967e-38;
CBaseEntity::EmitSound
((IRecipientFilter *)pfVar7[-2],(int)pfVar7[-1],(EmitSound_t *)*pfVar7);
local_12c = 0;
pfVar7[-2] = (float)&local_138;
pfVar7[-3] = 1.1884e-38;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)pfVar7[-2]);
pfVar7[-2] = (float)&local_138;
local_128 = local_138;
pfVar7[-3] = 1.1884028e-38;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)pfVar7[-2]);
local_184[0] = &PTR__CPASFilter_00bfaf28;
pfVar7[-2] = (float)local_184;
pfVar7[-3] = 1.1884062e-38;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)pfVar7[-2]);
}
}
iVar3 = *(int *)(this + 0x4f0);
fVar5 = (float)((int)fVar5 + 1);
pfVar7 = pfVar6;
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined1 **)((int)pfVar7 + -4) = &LAB_00816834;
__stack_chk_fail();
}
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.