CBasePlayerAnimState::ComputePoseParam_MoveYaw
0x004216e0 · 1258 bytes · __thiscall
_ZN20CBasePlayerAnimState24ComputePoseParam_MoveYawEP10CStudioHdr
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBasePlayerAnimState::ComputePoseParam_MoveYaw(CStudioHdr*) */
void __thiscall
CBasePlayerAnimState::ComputePoseParam_MoveYaw(CBasePlayerAnimState *this,CStudioHdr *param_1)
{
uint uVar1;
int iVar2;
char cVar3;
int iVar4;
longdouble lVar5;
float fVar6;
float fVar7;
float local_50;
double local_4c;
double local_44;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
local_3c = 0;
local_38 = 0;
if (___atan2f_finite == 0) {
local_2c = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,
"/data/src/game/server/../../game/shared/base_playeranimstate.cpp",0x304,
&ComputePoseParam_MoveYaw(CStudioHdr*)::tm_fmt,"(%s)%s","Unaccounted",
"CBasePlayerAnimState::ComputePoseParam_MoveYaw");
local_2c = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_34 = local_3c;
local_30 = local_38;
/* try { // try from 004217fe to 00421848 has its CatchHandler @ 00421bef */
if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
(iVar4 = ThreadGetCurrentId(), iVar2 != iVar4)) {
uVar1 = *(uint *)(this + 0xc);
}
else {
if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ComputePoseParam_MoveYaw") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b258,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
uVar1 = *(uint *)(this + 0xc);
}
if (uVar1 == 2) {
local_24 = *(undefined4 *)(this + 0x54);
local_28 = 0;
local_20 = 0;
/* try { // try from 00421881 to 00421976 has its CatchHandler @ 00421c04 */
CBaseEntity::SetLocalAngles(*(CBaseEntity **)(this + 0x14),(QAngle *)&local_28);
uVar1 = *(uint *)(this + 0xc);
}
if (uVar1 < 2) {
EstimateYaw(this);
local_50 = *(float *)(this + 0x1c);
if (180.0 < local_50) {
local_50 = local_50 - 360.0;
}
else if (local_50 < -180.0) {
local_50 = local_50 + 360.0;
}
cVar3 = (**(code **)(*(int *)this + 0x84))(this);
if (cVar3 == '\0') {
local_50 = *(float *)(this + 0x54) - *(float *)(this + 0x30);
if (this[0x34] != (CBasePlayerAnimState)0x0) {
local_50 = local_50 + 180.0;
}
}
else {
local_50 = local_50 - *(float *)(this + 0xa4);
}
AngleNormalize(local_50);
fVar6 = -local_50 - (float)((int)(-local_50 * 0.0027777778) * 0x168);
AngleNormalize(fVar6);
*(float *)(this + 0x8c) = fVar6;
if (*(int *)(this + 0xc) == 0) {
local_24 = *(undefined4 *)(this + 0x54);
local_28 = 0;
local_20 = 0;
/* try { // try from 00421ab5 to 00421adb has its CatchHandler @ 00421c04 */
CBaseEntity::SetLocalAngles(*(CBaseEntity **)(this + 0x14),(QAngle *)&local_28);
if ((*(int *)(this + 0x38) < 0) || (*(int *)(this + 0x3c) < 0)) goto LAB_004217a0;
lVar5 = (longdouble)(**(code **)(*(int *)this + 0x4c))(this);
if (local_28._0_1_ == (QAngle)0x0) {
fVar6 = 0.0;
fVar7 = 0.0;
}
else {
sincos((double)(fVar6 * 0.017453292),&local_44,&local_4c);
fVar7 = (float)(local_4c * (double)(float)lVar5);
fVar6 = (float)(-local_44 * (double)(float)lVar5);
}
if (*(int *)(SurvivorLean._28_4_ + 0x30) == 0) {
/* try { // try from 00421bc4 to 00421be7 has its CatchHandler @ 00421c04 */
CBaseAnimating::SetPoseParameter
(*(CBaseAnimating **)(this + 0x14),param_1,*(int *)(this + 0x38),fVar7);
CBaseAnimating::SetPoseParameter
(*(CBaseAnimating **)(this + 0x14),param_1,*(int *)(this + 0x3c),fVar6);
}
*(float *)(this + 0x78) = fVar7;
*(float *)(this + 0x7c) = fVar6;
}
else if (-1 < *(int *)(this + 0x40)) {
CBaseAnimating::SetPoseParameter
(*(CBaseAnimating **)(this + 0x14),param_1,*(int *)(this + 0x40),fVar6);
*(float *)(this + 0x8c) = fVar6;
}
iVar2 = _DAT_0105db00;
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_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
return;
}
}
else {
LAB_004217a0:
iVar2 = _DAT_0105db00;
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_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,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.