PhysFrictionSound
0x00494280 · 300 bytes · __cdecl
_Z17PhysFrictionSoundP11CBaseEntityP14IPhysicsObjectfii
Decompiled
undefined (5 params)
/* PhysFrictionSound(CBaseEntity*, IPhysicsObject*, float, int, int) */
void PhysFrictionSound(CBaseEntity *param_1,IPhysicsObject *param_2,float param_3,int param_4,
int param_5)
{
short sVar1;
int iVar2;
int iVar3;
char *pcVar4;
longdouble lVar5;
if ((((param_1 != (CBaseEntity *)0x0) && (75.0 <= param_3)) && (-1 < param_4)) &&
(param_1[0x300] == (CBaseEntity)0x0)) {
if ((param_2 != (IPhysicsObject *)0x0) &&
(lVar5 = (longdouble)(**(code **)(*(int *)param_2 + 0x78))(param_2), (float)lVar5 < 200.0)) {
return;
}
iVar2 = (**(code **)(*physprops + 0x18))(physprops,param_5);
iVar3 = (**(code **)(*physprops + 0x18))(physprops,param_4);
if ((*(short *)(iVar2 + 0x4c) != 0x58) && (*(short *)(iVar3 + 0x4c) != 0x58)) {
sVar1 = *(short *)(iVar3 + 0x3a);
if ((*(short *)(iVar3 + 0x38) != 0) &&
(*(float *)(iVar2 + 0x1c) <= *(float *)(iVar3 + 0x20) &&
*(float *)(iVar3 + 0x20) != *(float *)(iVar2 + 0x1c))) {
sVar1 = *(short *)(iVar3 + 0x38);
}
pcVar4 = (char *)(**(code **)(*physprops + 0x1c))(physprops,sVar1);
PhysFrictionSound(param_1,param_2,pcVar4,(short *)(iVar3 + 0x5e),
param_3 * 6.451613e-05 * param_3 * 6.451613e-05);
return;
}
}
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.