CBasePlayerAnimState::ComputePlaybackRate
0x00420010 · 619 bytes · __thiscall
_ZN20CBasePlayerAnimState19ComputePlaybackRateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBasePlayerAnimState::ComputePlaybackRate() */
void __thiscall CBasePlayerAnimState::ComputePlaybackRate(CBasePlayerAnimState *this)
{
int iVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
longdouble lVar5;
char local_25;
undefined4 local_24;
undefined4 local_20;
undefined4 local_18;
undefined4 local_14;
int local_10;
local_24 = 0;
local_20 = 0;
if (___atan2f_finite == 0) {
local_10 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_24,0,0,0,0,
"/data/src/game/server/../../game/shared/base_playeranimstate.cpp",0x2d4,
&ComputePlaybackRate()::tm_fmt,"(%s)%s","Unaccounted",
"CBasePlayerAnimState::ComputePlaybackRate");
local_10 = ___atan2f_finite;
}
iVar1 = _DAT_0105db00;
local_18 = local_24;
local_14 = local_20;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 00420156 to 004201a4 has its CatchHandler @ 004202b7 */
iVar4 = ThreadGetCurrentId();
if (iVar1 == iVar4) {
if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ComputePlaybackRate") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b1c8,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
if (1 < *(uint *)(this + 0xc)) {
/* try { // try from 004200d5 to 004200d7 has its CatchHandler @ 00420296 */
lVar5 = (longdouble)(**(code **)(*(int *)this + 0x4c))(this,&local_25);
iVar1 = *(int *)(this + 0x14);
if (local_25 == '\0') {
if (*(float *)(iVar1 + 0x468) != 1.0) {
if (*(char *)(iVar1 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
/* try { // try from 0042022b to 00420272 has its CatchHandler @ 00420296 */
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar1 + 0x70) = *(byte *)(iVar1 + 0x70) | 1;
}
*(undefined4 *)(iVar1 + 0x468) = 0x3f800000;
}
}
else if ((float)lVar5 != *(float *)(iVar1 + 0x468)) {
if (*(char *)(iVar1 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar1 + 0x70) = *(byte *)(iVar1 + 0x70) | 1;
}
*(float *)(iVar1 + 0x468) = (float)lVar5;
}
}
iVar1 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar4 = ThreadGetCurrentId();
if (iVar1 == iVar4) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_10 != 0) {
(**(code **)(local_10 + 0x54))(local_10,local_18,local_14,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.