CBasePlayerAnimState::ComputePoseParam_BodyYaw
0x004208a0 · 738 bytes · __thiscall
_ZN20CBasePlayerAnimState24ComputePoseParam_BodyYawEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBasePlayerAnimState::ComputePoseParam_BodyYaw() */
void __thiscall CBasePlayerAnimState::ComputePoseParam_BodyYaw(CBasePlayerAnimState *this)
{
float fVar1;
int iVar2;
char cVar3;
int iVar4;
float fVar5;
float fVar6;
longdouble lVar7;
float fVar8;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/base_playeranimstate.cpp",0x426,
&ComputePoseParam_BodyYaw()::tm_fmt,"(%s)%s","Unaccounted",
"CBasePlayerAnimState::ComputePoseParam_BodyYaw");
local_20 = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00420ace to 00420b1c has its CatchHandler @ 00420bbc */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ComputePoseParam_BodyYaw") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b1f4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00420959 to 00420a60 has its CatchHandler @ 00420b9b */
(**(code **)(*(int *)this + 0x80))(this);
lVar7 = (longdouble)AngleNormalize(*(float *)(this + 0x30));
fVar1 = (float)lVar7;
fVar8 = *(float *)(this + 0x54);
*(float *)(this + 0x30) = fVar1;
if (fVar1 != fVar8) {
fVar5 = *(float *)(this + 4);
fVar6 = *(float *)(mp_feetyawrate._28_4_ + 0x2c);
lVar7 = (longdouble)AngleNormalize(fVar1 - fVar8);
fVar8 = (float)lVar7;
if ((fVar8 < *(float *)(this + 8)) ||
(*(float *)(this + 4) <= fVar8 && fVar8 != *(float *)(this + 4))) {
fVar6 = *(float *)(mp_feetyawrate_max._28_4_ + 0x2c);
fVar5 = 360.0;
}
ConvergeAngles(this,*(float *)(this + 0x30),fVar6,fVar5,*(float *)(gpGlobals + 0x10),
(float *)(this + 0x54));
*(undefined4 *)(this + 100) = *(undefined4 *)(gpGlobals + 0xc);
fVar8 = *(float *)(this + 0x54);
}
lVar7 = (longdouble)AngleNormalize(*(float *)(this + 0x1c) - fVar8);
fVar8 = (float)lVar7;
*(undefined4 *)(this + 0x74) = 0;
*(undefined4 *)(this + 0x6c) = 0;
*(undefined4 *)(this + 0x70) = *(undefined4 *)(this + 0x54);
(**(code **)(*(int *)this + 0x3c))(this,fVar8);
iVar2 = _DAT_0105db00;
g_flLastBodyYaw = fVar8;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
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.