CPhysicsProp::ShouldDisableMotionOnFreeze
0x007f14c0 · 201 bytes · __thiscall
_ZN12CPhysicsProp27ShouldDisableMotionOnFreezeEv
Decompiled
undefined (1 param)
/* CPhysicsProp::ShouldDisableMotionOnFreeze() */
undefined4 __thiscall CPhysicsProp::ShouldDisableMotionOnFreeze(CPhysicsProp *this)
{
int *piVar1;
char cVar2;
int *piVar3;
int *piVar4;
int iVar5;
if (*(float *)(gpGlobals + 0xc) < *(float *)(this + 0x1668)) {
return 0;
}
piVar1 = *(int **)(this + 0x238);
*(float *)(this + 0x1668) = *(float *)(gpGlobals + 0xc) + 0.5;
piVar3 = (int *)(**(code **)(*piVar1 + 0x144))(piVar1);
while( true ) {
cVar2 = (**(code **)(*piVar3 + 8))(piVar3);
if (cVar2 == '\0') {
(**(code **)(*piVar1 + 0x148))(piVar1,piVar3);
return 1;
}
piVar4 = (int *)(**(code **)(*piVar3 + 0xc))(piVar3,1);
iVar5 = (**(code **)(*piVar4 + 0x48))(piVar4);
if (((iVar5 != 0) &&
(iVar5 = __dynamic_cast(iVar5,&CBaseEntity::typeinfo,&typeinfo,0), iVar5 != 0)) &&
((*(byte *)(iVar5 + 0x14a) & 1) == 0)) break;
(**(code **)(*piVar3 + 0x34))(piVar3);
}
return 0;
}
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.