CPhysConstraint::Deactivate
0x007761a0 · 192 bytes · __thiscall
_ZN15CPhysConstraint10DeactivateEv
Decompiled
undefined (1 param)
/* CPhysConstraint::Deactivate() */
void __thiscall CPhysConstraint::Deactivate(CPhysConstraint *this)
{
int *piVar1;
uint uVar2;
IPhysicsObject *pIVar3;
IPhysicsObject *pIVar4;
piVar1 = *(int **)(this + 0x440);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0xc))(piVar1);
piVar1 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
if (piVar1 != (int *)0x0) {
uVar2 = (**(code **)(*piVar1 + 0x50))(piVar1);
(**(code **)(*piVar1 + 0x4c))(piVar1,uVar2 & 0xfffd);
}
piVar1 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
if (piVar1 != (int *)0x0) {
uVar2 = (**(code **)(*piVar1 + 0x50))(piVar1);
(**(code **)(*piVar1 + 0x4c))(piVar1,uVar2 & 0xfffd);
}
if (((byte)this[0x148] & 1) != 0) {
pIVar3 = (IPhysicsObject *)
(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
pIVar4 = (IPhysicsObject *)
(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
if ((pIVar4 != (IPhysicsObject *)0x0) && (pIVar3 != (IPhysicsObject *)0x0)) {
PhysEnableEntityCollisions(pIVar3,pIVar4);
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.