CGrabController::GetSavedMass
0x004ecef0 · 182 bytes · __thiscall
_ZN15CGrabController12GetSavedMassEP14IPhysicsObject
Decompiled
undefined (2 params)
/* CGrabController::GetSavedMass(IPhysicsObject*) */
longdouble __thiscall CGrabController::GetSavedMass(CGrabController *this,IPhysicsObject *param_1)
{
uint uVar1;
int *piVar2;
int *piVar3;
int iVar4;
undefined *puVar5;
int iVar6;
float fVar7;
IPhysicsObject *local_101c [1027];
uVar1 = *(uint *)(this + 0x2068);
if ((((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
((piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0 &&
(piVar3 = (int *)(**(code **)(*(int *)param_1 + 0x48))(param_1), piVar3 == piVar2)))) {
iVar4 = (**(code **)(*piVar3 + 0x2b8))(piVar3,local_101c,0x400);
if (0 < iVar4) {
iVar6 = 0;
if (local_101c[0] == param_1) {
iVar6 = 0;
}
else {
do {
iVar6 = iVar6 + 1;
if (iVar6 == iVar4) goto LAB_004ecf2f;
} while (local_101c[iVar6] != param_1);
}
fVar7 = *(float *)(this + iVar6 * 4 + 0x1068);
goto LAB_004ecf32;
}
}
LAB_004ecf2f:
fVar7 = 0.0;
LAB_004ecf32:
return (longdouble)fVar7;
}
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.