CBaseAnimatingOverlay::GetSkeleton
0x005ed390 · 945 bytes · __thiscall
_ZN21CBaseAnimatingOverlay11GetSkeletonEP10CStudioHdrRK11matrix3x4_tP6VectorP17QuaternionAlignedi
Decompiled
undefined (6 params)
/* CBaseAnimatingOverlay::GetSkeleton(CStudioHdr*, matrix3x4_t const&, Vector*, QuaternionAligned*,
int) */
void __thiscall
CBaseAnimatingOverlay::GetSkeleton
(CBaseAnimatingOverlay *this,CStudioHdr *param_1,matrix3x4_t *param_2,Vector *param_3,
QuaternionAligned *param_4,int param_5)
{
CBaseAnimatingOverlay *pCVar1;
char cVar2;
int iVar3;
int *piVar4;
byte *pbVar5;
int iVar6;
int iVar7;
CUtlMemory<ikcontextikrule_t,int> *this_00;
int in_GS_OFFSET;
int local_10bc [15];
CIKContext local_1080 [4092];
int local_84 [3];
int local_78;
int local_74;
undefined4 local_70 [3];
undefined4 local_64;
undefined4 local_60;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((param_1 != (CStudioHdr *)0x0) &&
(cVar2 = CStudioHdr::SequencesAvailable(param_1), cVar2 != '\0')) {
InitPose(param_1,param_3,param_4,param_5);
pCVar1 = this + 0x498;
AccumulatePose(param_1,*(CIKContext **)(this + 0x480),param_3,(Quaternion *)param_4,
*(int *)(this + 0x494),*(float *)(this + 0x490),(float *)pCVar1,param_5,1.0,
*(float *)(gpGlobals + 0xc));
iVar7 = *(int *)(this + 0x1400);
if (0 < iVar7) {
piVar4 = local_10bc;
do {
*piVar4 = 0xf;
piVar4 = piVar4 + 1;
} while (piVar4 != local_10bc + iVar7);
pbVar5 = *(byte **)(this + 0x13f4);
iVar3 = 0;
do {
if ((((0.0 < *(float *)(pbVar5 + 0x14)) && ((*pbVar5 & 1) != 0)) &&
(iVar6 = *(int *)(pbVar5 + 0x3c), -1 < iVar6)) && (iVar6 < iVar7)) {
local_10bc[iVar6] = iVar3;
}
iVar3 = iVar3 + 1;
pbVar5 = pbVar5 + 0x4c;
} while (iVar3 != iVar7);
iVar3 = 0;
do {
iVar6 = local_10bc[iVar3];
if ((-1 < iVar6) && (iVar6 < iVar7)) {
iVar6 = iVar6 * 0x4c + *(int *)(this + 0x13f4);
if (*(float *)(iVar6 + 0xc) != 8388607.0) {
AccumulatePose(param_1,*(CIKContext **)(this + 0x480),param_3,(Quaternion *)param_4,
*(int *)(iVar6 + 8),*(float *)(iVar6 + 0xc),(float *)pCVar1,param_5,
*(float *)(iVar6 + 0x14),*(float *)(gpGlobals + 0xc));
iVar7 = *(int *)(this + 0x1400);
}
}
iVar3 = iVar3 + 1;
} while (iVar3 < iVar7);
}
if (*(int *)(this + 0x480) == 0) {
CalcAutoplaySequences
(param_1,(CIKContext *)0x0,param_3,(Quaternion *)param_4,(float *)pCVar1,param_5,
*(float *)(gpGlobals + 0xc));
}
else {
CIKContext::CIKContext(local_1080);
/* try { // try from 005ed5e7 to 005ed62c has its CatchHandler @ 005ed74c */
CIKContext::Init(local_1080,param_1,param_2,*(float *)(gpGlobals + 0xc),0,param_5);
CalcAutoplaySequences
(param_1,local_1080,param_3,(Quaternion *)param_4,(float *)pCVar1,param_5,
*(float *)(gpGlobals + 0xc));
local_64 = 0;
CUtlMemory<ikcontextikrule_t,int>::Purge((CUtlMemory<ikcontextikrule_t,int> *)local_70);
local_60 = local_70[0];
CUtlMemory<ikcontextikrule_t,int>::Purge((CUtlMemory<ikcontextikrule_t,int> *)local_70);
local_78 = local_78 + -1;
if (-1 < local_78) {
iVar7 = local_78 * 0x14;
do {
local_78 = local_78 + -1;
this_00 = (CUtlMemory<ikcontextikrule_t,int> *)(local_84[0] + iVar7);
iVar7 = iVar7 + -0x14;
*(undefined4 *)(this_00 + 0xc) = 0;
CUtlMemory<ikcontextikrule_t,int>::Purge(this_00);
*(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
CUtlMemory<ikcontextikrule_t,int>::Purge(this_00);
} while (local_78 != -1);
}
local_78 = 0;
CUtlMemory<CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>,int>::Purge
((CUtlMemory<CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>,int> *)
local_84);
local_74 = local_84[0];
CUtlMemory<CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>,int>::Purge
((CUtlMemory<CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>,int> *)
local_84);
}
CalcBoneAdj(param_1,param_3,(Quaternion *)param_4,(float *)(this + 0x4f8),param_5);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.