CCSGameMovement::ComputeAngles
0x00430640 · 373 bytes · __thiscall
_ZN15CCSGameMovement13ComputeAnglesEv
Decompiled
undefined (1 param)
/* CCSGameMovement::ComputeAngles() */
void __thiscall CCSGameMovement::ComputeAngles(CCSGameMovement *this)
{
code *pcVar1;
char cVar2;
int iVar3;
float *pfVar4;
longdouble lVar5;
float local_18;
float local_14;
float local_10;
(**(code **)(*(int *)this + 0x4c))(this);
cVar2 = CGameMovement::IsDead((CGameMovement *)this);
iVar3 = *(int *)(this + 8);
if (cVar2 == '\0') {
local_18 = *(float *)(iVar3 + 0x4c);
local_14 = *(float *)(iVar3 + 0x50);
local_10 = *(float *)(iVar3 + 0x54);
pfVar4 = (float *)CBasePlayer::GetPunchAngle(*(CBasePlayer **)(this + 4));
local_18 = *pfVar4 + local_18;
local_14 = pfVar4[1] + local_14;
local_10 = pfVar4[2] + local_10;
if ((*(char *)(*(int *)(this + 4) + 0x186) == '\x01') ||
(*(char *)(*(int *)(this + 4) + 0x186) == '\b')) {
*(undefined4 *)(*(int *)(this + 8) + 0x54) = 0;
}
else {
iVar3 = *(int *)(this + 8);
lVar5 = (longdouble)
(**(code **)(*(int *)this + 0x48))
(this,&local_18,iVar3 + 0x40,*(undefined4 *)(sv_rollangle._28_4_ + 0x2c),
*(undefined4 *)(sv_rollspeed._28_4_ + 0x2c));
*(float *)(iVar3 + 0x54) = (float)lVar5;
}
*(float *)(*(int *)(this + 8) + 0x4c) = local_18;
*(float *)(*(int *)(this + 8) + 0x50) = local_14;
}
else {
*(undefined4 *)(iVar3 + 0x4c) = *(undefined4 *)(iVar3 + 0x58);
*(undefined4 *)(iVar3 + 0x50) = *(undefined4 *)(iVar3 + 0x5c);
*(undefined4 *)(iVar3 + 0x54) = *(undefined4 *)(iVar3 + 0x60);
}
cVar2 = CGameMovement::IsDead((CGameMovement *)this);
if (cVar2 != '\0') {
pcVar1 = *(code **)(**(int **)(this + 4) + 0x254);
iVar3 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
(*pcVar1)(*(undefined4 *)(this + 4),iVar3 + 0x60);
}
iVar3 = *(int *)(this + 8);
lVar5 = (longdouble)AngleNormalize(*(float *)(iVar3 + 0x50));
*(float *)(iVar3 + 0x50) = (float)lVar5;
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.