PhysFrictionEffect
0x004940e0 · 375 bytes · __cdecl
_Z18PhysFrictionEffectR6VectorS_fii
Decompiled
undefined (5 params)
/* PhysFrictionEffect(Vector&, Vector, float, int, int) */
void PhysFrictionEffect(undefined4 *param_1)
{
int iVar1;
int iVar2;
float in_stack_00000014;
undefined4 in_stack_00000018;
undefined4 in_stack_0000001c;
undefined4 local_18;
undefined4 local_14;
undefined4 local_10;
VectorAngles((Vector *)&stack0x00000008,(QAngle *)&local_18);
iVar1 = (**(code **)(*physprops + 0x18))(physprops,in_stack_00000018);
iVar2 = (**(code **)(*physprops + 0x18))(physprops,in_stack_0000001c);
if (*(short *)(iVar2 + 0x4c) == 0x43) {
if (in_stack_00000014 < 7840.0) goto LAB_0049413c;
}
else if ((*(short *)(iVar2 + 0x4c) != 0x44) || (in_stack_00000014 < 2250.0)) goto LAB_0049413c;
DispatchParticleEffect
("impact_physics_dust",*param_1,param_1[1],param_1[2],local_18,local_14,local_10,0,0,
0xffffffff);
LAB_0049413c:
if (((25000.0 < in_stack_00000014) &&
((*(short *)(iVar1 + 0x4c) == 0x47 || (*(short *)(iVar1 + 0x4c) == 0x4d)))) &&
((*(short *)(iVar2 + 0x4c) == 0x43 || (*(short *)(iVar2 + 0x4c) == 0x4d)))) {
DispatchParticleEffect
("impact_physics_sparks",*param_1,param_1[1],param_1[2],local_18,local_14,local_10,0,0
,0xffffffff);
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.