CItem::ConstrainItem
0x006e3fc0 · 353 bytes · __thiscall
_ZN5CItem13ConstrainItemEv
Decompiled
undefined (1 param)
/* CItem::ConstrainItem() */
void __thiscall CItem::ConstrainItem(CItem *this)
{
int *piVar1;
int iVar2;
int *piVar3;
matrix3x4_t local_c4 [48];
matrix3x4_t local_94 [48];
matrix3x4_t local_64 [48];
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined1 local_20;
piVar1 = g_PhysWorldObject;
piVar3 = *(int **)(this + 0x238);
if ((piVar3 != (int *)0x0) && (g_PhysWorldObject != (int *)0x0)) {
SetIdentityMatrix(local_64);
local_30 = 0;
local_2c = 0;
local_34 = 0x3f800000;
local_28 = 0x3f800000;
local_24 = 0x3f800000;
local_20 = 1;
(**(code **)(*piVar1 + 200))(piVar1,local_94);
MatrixInvert(local_94,local_c4);
(**(code **)(*piVar3 + 200))(piVar3,local_94);
ConcatTransforms(local_c4,local_94,local_64);
local_30 = 0x458e0ba3;
local_2c = 0x458e0ba3;
iVar2 = (**(code **)(*piVar3 + 0x15c))(piVar3);
if (iVar2 == 0) {
piVar3 = (int *)(**(code **)(*physenv + 0x48))(physenv,piVar1,piVar3,0,local_64);
*(int **)(this + 0x1444) = piVar3;
}
else {
piVar3 = (int *)(**(code **)(*g_pPhys2World + 0x90))(g_pPhys2World,0,iVar2,0,local_64,0);
*(int **)(this + 0x1444) = piVar3;
}
(**(code **)(*piVar3 + 0x10))(piVar3,this);
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.