CPathTrack::GetOrientation
0x007721f0 · 235 bytes · __cdecl
_ZN10CPathTrack14GetOrientationEb
Decompiled
undefined (1 param)
/* CPathTrack::GetOrientation(bool) */
undefined4 * CPathTrack::GetOrientation(bool param_1)
{
CPathTrack *pCVar1;
CPathTrack *pCVar2;
undefined3 in_stack_00000005;
CPathTrack *in_stack_00000008;
bool in_stack_0000000c;
float local_34;
float local_30;
float local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (*(int *)(in_stack_00000008 + 0x45c) != 2) {
pCVar1 = (CPathTrack *)GetNextInDir(in_stack_00000008,in_stack_0000000c);
pCVar2 = in_stack_00000008;
if (pCVar1 == (CPathTrack *)0x0) {
pCVar2 = (CPathTrack *)GetNextInDir(in_stack_00000008,(bool)(in_stack_0000000c ^ 1));
pCVar1 = in_stack_00000008;
}
local_34 = *(float *)(pCVar1 + 0x39c) - *(float *)(pCVar2 + 0x39c);
local_30 = *(float *)(pCVar1 + 0x3a0) - *(float *)(pCVar2 + 0x3a0);
local_2c = *(float *)(pCVar1 + 0x3a4) - *(float *)(pCVar2 + 0x3a4);
VectorAngles((Vector *)&local_34,(QAngle *)&local_28);
*_param_1 = local_28;
_param_1[1] = local_24;
_param_1[2] = local_20;
return _param_1;
}
*_param_1 = *(undefined4 *)(in_stack_00000008 + 0x3a8);
_param_1[1] = *(undefined4 *)(in_stack_00000008 + 0x3ac);
_param_1[2] = *(undefined4 *)(in_stack_00000008 + 0x3b0);
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.