CPhysHinge::Deactivate
0x00776b50 · 252 bytes · __thiscall
_ZN10CPhysHinge10DeactivateEv
Decompiled
undefined (1 param)
/* CPhysHinge::Deactivate() */
void __thiscall CPhysHinge::Deactivate(CPhysHinge *this)
{
int iVar1;
int *piVar2;
uint uVar3;
IPhysicsObject *pIVar4;
IPhysicsObject *pIVar5;
piVar2 = *(int **)(this + 0x440);
if (((byte)this[0x148] & 8) != 0) {
if (piVar2 == (int *)0x0) {
return;
}
iVar1 = (**(code **)(*piVar2 + 0x1c))(piVar2);
piVar2 = *(int **)(this + 0x440);
if (iVar1 != 0) {
piVar2 = (int *)(**(code **)(*piVar2 + 0x1c))(piVar2);
(**(code **)(*piVar2 + 0x140))(piVar2);
piVar2 = *(int **)(this + 0x440);
}
}
if (piVar2 != (int *)0x0) {
(**(code **)(*piVar2 + 0xc))(piVar2);
piVar2 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
if (piVar2 != (int *)0x0) {
uVar3 = (**(code **)(*piVar2 + 0x50))(piVar2);
(**(code **)(*piVar2 + 0x4c))(piVar2,uVar3 & 0xfffd);
}
piVar2 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
if (piVar2 != (int *)0x0) {
uVar3 = (**(code **)(*piVar2 + 0x50))(piVar2);
(**(code **)(*piVar2 + 0x4c))(piVar2,uVar3 & 0xfffd);
}
if (((byte)this[0x148] & 1) != 0) {
pIVar4 = (IPhysicsObject *)
(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
pIVar5 = (IPhysicsObject *)
(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
if ((pIVar5 != (IPhysicsObject *)0x0) && (pIVar4 != (IPhysicsObject *)0x0)) {
PhysEnableEntityCollisions(pIVar4,pIVar5);
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.