PhysCleanupFrictionSounds
0x0077cf10 · 104 bytes · __cdecl
_Z25PhysCleanupFrictionSoundsP11CBaseEntity
Decompiled
undefined (1 param)
/* PhysCleanupFrictionSounds(CBaseEntity*) */
void PhysCleanupFrictionSounds(CBaseEntity *param_1)
{
friction_t *pfVar1;
int iVar2;
friction_t *pfVar3;
pfVar1 = (friction_t *)(g_Collisions + 0xc);
iVar2 = 0;
pfVar3 = (friction_t *)0x0;
do {
if (*(CBaseEntity **)(pfVar1 + 4) == (CBaseEntity *)0x0) {
if (pfVar3 == (friction_t *)0x0) {
pfVar3 = pfVar1;
}
if (param_1 == (CBaseEntity *)0x0) goto LAB_0077cf70;
}
else if (param_1 == *(CBaseEntity **)(pfVar1 + 4)) {
LAB_0077cf70:
pfVar3 = (friction_t *)(g_Collisions + iVar2 * 0x10 + 0xc);
goto LAB_0077cf3e;
}
iVar2 = iVar2 + 1;
pfVar1 = pfVar1 + 0x10;
} while (iVar2 != 4);
if (pfVar3 != (friction_t *)0x0) {
LAB_0077cf3e:
if (*(int *)pfVar3 != 0) {
CCollisionEvent::ShutdownFriction((CCollisionEvent *)g_Collisions,pfVar3);
}
}
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.