CCollisionEvent::Friction
0x007793f0 · 317 bytes · __thiscall
_ZN15CCollisionEvent8FrictionEP14IPhysicsObjectfiiP21IPhysicsCollisionData
Decompiled
undefined (6 params)
/* CCollisionEvent::Friction(IPhysicsObject*, float, int, int, IPhysicsCollisionData*) */
void __thiscall
CCollisionEvent::Friction
(CCollisionEvent *this,IPhysicsObject *param_1,float param_2,int param_3,int param_4,
IPhysicsCollisionData *param_5)
{
int *piVar1;
int iVar2;
int iVar3;
int iVar4;
undefined1 local_34 [12];
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + 1;
/* try { // try from 00779415 to 007794e9 has its CatchHandler @ 00779540 */
(**(code **)(*(int *)param_5 + 4))(param_5,local_34);
(**(code **)(*(int *)param_1 + 0xdc))(param_1,local_34,&local_28);
piVar1 = (int *)(**(code **)(*(int *)param_1 + 0x48))(param_1);
iVar4 = 0;
iVar2 = 0;
iVar3 = 0xfec30c;
if (piVar1 != (int *)0x0) {
do {
if (*(int **)(iVar3 + 4) == (int *)0x0) {
if (iVar4 == 0) {
iVar4 = iVar3;
}
}
else if (piVar1 == *(int **)(iVar3 + 4)) {
iVar4 = iVar2 * 0x10 + 0xfec30c;
goto LAB_00779465;
}
iVar2 = iVar2 + 1;
iVar3 = iVar3 + 0x10;
} while (iVar2 != 4);
if (iVar4 != 0) {
LAB_00779465:
if ((*(int *)(iVar4 + 4) != 0) &&
(*(float *)(gpGlobals + 0xc) < *(float *)(iVar4 + 0xc) + 0.5)) {
*(float *)(iVar4 + 8) = *(float *)(gpGlobals + 0xc);
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + -1;
return;
}
}
(**(code **)(*piVar1 + 0x2b0))(piVar1,param_1,param_2,param_3,param_4);
}
PhysFrictionEffect(local_34,local_28,local_24,local_20,param_2,param_3,param_4);
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + -1;
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.