CBasePlayerAnimState::ClearAnimationLayers
0x0041e210 · 775 bytes · __thiscall
_ZN20CBasePlayerAnimState20ClearAnimationLayersEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBasePlayerAnimState::ClearAnimationLayers() */
void __thiscall CBasePlayerAnimState::ClearAnimationLayers(CBasePlayerAnimState *this)
{
undefined4 uVar1;
CBaseEdict *this_00;
int iVar2;
char cVar3;
int iVar4;
undefined4 *puVar5;
CBaseAnimatingOverlay *pCVar6;
int iVar7;
int iVar8;
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",0x15a,
&ClearAnimationLayers()::tm_fmt,"(%s)%s","Unaccounted",
"CBasePlayerAnimState::ClearAnimationLayers");
local_20 = ___atan2f_finite;
}
iVar8 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 0041e396 to 0041e3e4 has its CatchHandler @ 0041e525 */
if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
(iVar7 = ThreadGetCurrentId(), iVar8 != iVar7)) {
pCVar6 = *(CBaseAnimatingOverlay **)(this + 0x14);
iVar8 = _DAT_0105db00;
}
else {
if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ClearAnimationLayers") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b0f0,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
pCVar6 = *(CBaseAnimatingOverlay **)(this + 0x14);
iVar8 = _DAT_0105db00;
}
_DAT_0105db00 = iVar8;
if (pCVar6 == (CBaseAnimatingOverlay *)0x0) {
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar7 = ThreadGetCurrentId(), iVar8 == iVar7)) {
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;
}
}
else {
/* try { // try from 0041e2da to 0041e370 has its CatchHandler @ 0041e53a */
CBaseAnimatingOverlay::SetNumAnimOverlays(pCVar6,5);
iVar8 = 0;
pCVar6 = *(CBaseAnimatingOverlay **)(this + 0x14);
if (0 < *(int *)(pCVar6 + 0x1400)) {
do {
iVar7 = CBaseAnimatingOverlay::GetAnimOverlay(pCVar6,iVar8);
if (*(int *)(iVar7 + 0x3c) != 0xf) {
iVar2 = *(int *)(iVar7 + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
this_00 = *(CBaseEdict **)(iVar2 + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
*(undefined4 *)(iVar7 + 0x3c) = 0xf;
}
puVar5 = (undefined4 *)
CBaseAnimatingOverlay::GetAnimOverlay
(*(CBaseAnimatingOverlay **)(this + 0x14),iVar8);
*puVar5 = 0;
iVar8 = iVar8 + 1;
pCVar6 = *(CBaseAnimatingOverlay **)(this + 0x14);
} while (iVar8 < *(int *)(pCVar6 + 0x1400));
}
iVar8 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar7 = ThreadGetCurrentId(), iVar8 == iVar7)) {
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.