physicssound::AddBreakSound
0x0077dc40 · 222 bytes · __cdecl
_ZN12physicssound13AddBreakSoundER10CUtlVectorINS_12breaksound_tE10CUtlMemoryIS1_iEERK6Vectort
Decompiled
undefined (3 params)
/* physicssound::AddBreakSound(CUtlVector<physicssound::breaksound_t,
CUtlMemory<physicssound::breaksound_t, int> >&, Vector const&, unsigned short) */
void physicssound::AddBreakSound(CUtlVector *param_1,Vector *param_2,ushort param_3)
{
float fVar1;
float fVar2;
int iVar3;
int iVar4;
uint *puVar5;
uint uVar6;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
uint local_20;
uVar6 = (uint)param_3;
iVar3 = (**(code **)(*physprops + 0x18))(physprops,uVar6);
if (*(short *)(iVar3 + 0x40) == 0) {
return;
}
iVar3 = *(int *)(param_1 + 0xc);
iVar4 = iVar3 + -1;
if (-1 < iVar4) {
puVar5 = (uint *)(iVar4 * 0x10 + *(int *)param_1 + 0xc);
do {
if ((2 < iVar3) && (uVar6 == *puVar5)) {
fVar1 = *(float *)(param_2 + 8);
fVar2 = *(float *)param_2;
puVar5[-2] = (uint)((*(float *)(param_2 + 4) + (float)puVar5[-2]) * 0.5);
puVar5[-1] = (uint)((fVar1 + (float)puVar5[-1]) * 0.5);
puVar5[-3] = (uint)((fVar2 + (float)puVar5[-3]) * 0.5);
return;
}
iVar4 = iVar4 + -1;
puVar5 = puVar5 + -4;
} while (iVar4 != -1);
}
local_2c = *(undefined4 *)param_2;
local_28 = *(undefined4 *)(param_2 + 4);
local_24 = *(undefined4 *)(param_2 + 8);
local_20 = uVar6;
CUtlVector<physicssound::breaksound_t,CUtlMemory<physicssound::breaksound_t,int>>::InsertBefore
((CUtlVector<physicssound::breaksound_t,CUtlMemory<physicssound::breaksound_t,int>> *)
param_1,iVar3,(breaksound_t *)&local_2c);
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.