CBasePlayer::BodyTarget
0x007a70c0 · 309 bytes · __cdecl
_ZN11CBasePlayer10BodyTargetERK6Vectorb
Decompiled
undefined (2 params)
/* CBasePlayer::BodyTarget(Vector const&, bool) */
Vector * CBasePlayer::BodyTarget(Vector *param_1,bool param_2)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
char cVar7;
float *pfVar8;
int *piVar9;
longdouble lVar10;
undefined3 in_stack_00000009;
undefined4 in_stack_0000000c;
char in_stack_00000010;
cVar7 = (**(code **)(*(int *)_param_2 + 0x4fc))(_param_2);
if (cVar7 != '\0') {
piVar9 = (int *)(**(code **)(*(int *)_param_2 + 0x500))(_param_2);
piVar9 = (int *)(**(code **)(*piVar9 + 0x20))(piVar9);
(**(code **)(*piVar9 + 0x244))(param_1,piVar9,in_stack_0000000c,in_stack_00000010);
return param_1;
}
if (in_stack_00000010 != '\0') {
lVar10 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3f333333,0x3f800000);
fVar6 = (float)lVar10;
pfVar8 = (float *)(**(code **)(*(int *)_param_2 + 0x250))(_param_2);
fVar1 = *pfVar8;
fVar2 = pfVar8[1];
fVar3 = pfVar8[2];
if (((byte)_param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(_param_2);
}
fVar4 = *(float *)(_param_2 + 0x2e4);
fVar5 = *(float *)(_param_2 + 0x2e8);
*(float *)param_1 = fVar1 * fVar6 + *(float *)(_param_2 + 0x2e0);
*(float *)(param_1 + 4) = fVar2 * fVar6 + fVar4;
*(float *)(param_1 + 8) = fVar6 * fVar3 + fVar5;
return param_1;
}
(**(code **)(*(int *)_param_2 + 0x234))(param_1,_param_2);
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.