CGrabController::TransformAnglesToPlayerSpace
0x004ec0e0 · 136 bytes · __cdecl
_ZN15CGrabController28TransformAnglesToPlayerSpaceERK6QAngleP11CBasePlayer
Decompiled
undefined (2 params)
/* CGrabController::TransformAnglesToPlayerSpace(QAngle const&, CBasePlayer*) */
QAngle * CGrabController::TransformAnglesToPlayerSpace(QAngle *param_1,CBasePlayer *param_2)
{
int iVar1;
matrix3x4_t *in_stack_0000000c;
CBaseEntity *in_stack_00000010;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
matrix3x4_t local_3c [48];
if (param_2[0x61] == (CBasePlayer)0x0) {
if (((byte)in_stack_00000010[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(in_stack_00000010);
}
}
else {
iVar1 = (**(code **)(*(int *)in_stack_00000010 + 0x238))();
local_44 = *(undefined4 *)(iVar1 + 4);
local_48 = 0;
local_40 = *(undefined4 *)(iVar1 + 8);
AngleMatrix((QAngle *)&local_48,local_3c);
}
TransformAnglesToLocalSpace(param_1,in_stack_0000000c);
return param_1;
}
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.