CIKContext::AddDependencies
0x00b8a880 · 1213 bytes · __thiscall
_ZN10CIKContext15AddDependenciesER16mstudioseqdesc_tifPKff
Decompiled
undefined (6 params)
/* CIKContext::AddDependencies(mstudioseqdesc_t&, int, float, float const*, float) */
void __thiscall
CIKContext::AddDependencies
(CIKContext *this,mstudioseqdesc_t *param_1,int param_2,float param_3,float *param_4,
float param_5)
{
int iVar1;
char cVar2;
CStudioHdr *pCVar3;
int iVar4;
CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>> *this_00;
undefined4 *puVar5;
CIKContext *pCVar6;
int iVar7;
longdouble lVar8;
double dVar9;
mstudioanimdesc_t *local_c0 [4];
float local_b0 [4];
undefined4 local_a0;
int local_9c;
int local_98;
int local_94;
undefined4 local_90;
undefined4 local_8c;
undefined4 local_88;
undefined4 local_84;
undefined4 local_80;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
float local_44;
float local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
pCVar3 = *(CStudioHdr **)(this + 0xff8);
if ((*(int *)(*(int *)pCVar3 + 0x11c) != 0) && (*(int *)(param_1 + 0x90) != 0)) {
if (param_5 <= 0.0) {
param_5 = 0.0;
}
if (1.0 <= param_5) {
param_5 = 1.0;
}
if ((*(uint *)(param_1 + 0xc) & 0x100) == 0) {
if ((1.0 <= param_3) || (param_3 < 0.0)) {
if ((*(uint *)(param_1 + 0xc) & 1) == 0) {
dVar9 = (double)param_3;
if (0.9999 <= dVar9) {
dVar9 = 0.9999;
}
if (dVar9 <= 0.0) {
dVar9 = 0.0;
}
param_3 = (float)dVar9;
}
else {
param_3 = param_3 - (float)(int)param_3;
if (param_3 < 0.0) {
param_3 = param_3 + 1.0;
}
}
}
}
else {
lVar8 = (longdouble)Studio_CPS(pCVar3,param_1,param_2,param_4);
pCVar3 = *(CStudioHdr **)(this + 0xff8);
param_3 = (float)lVar8 * *(float *)(this + 0x1058) -
(float)(int)((float)lVar8 * *(float *)(this + 0x1058));
}
iVar7 = 0;
Studio_SeqAnims(pCVar3,param_1,param_2,param_4,local_c0,local_b0);
if (0 < *(int *)(param_1 + 0x90)) {
do {
cVar2 = Studio_IKSequenceError
(*(CStudioHdr **)(this + 0xff8),param_1,param_2,param_3,iVar7,param_4,
local_c0,local_b0,(ikcontextikrule_t *)&local_a0);
if (cVar2 != '\0') {
iVar4 = **(int **)(this + 0xff8);
iVar1 = (*(int **)(this + 0xff8))[0xb];
iVar4 = local_98 * 0x10 + *(int *)(iVar4 + 0x120) + iVar4;
if (((*(uint *)(iVar1 + *(int *)(iVar4 + 0x38 + *(int *)(iVar4 + 0xc)) * 4) &
*(uint *)(this + 0x105c)) != 0) &&
((local_94 < 0 || ((*(uint *)(iVar1 + local_94 * 4) & *(uint *)(this + 0x105c)) != 0)))
) {
if (*(int *)(this + 0xff0) == 0) {
*(undefined4 *)(this + 0xff0) = 0xc;
*(CIKContext **)(this + 0xff4) = this;
CUtlVector<CIKTarget,CUtlMemoryFixed<CIKTarget,12u,0>>::ShiftElementsRight
((CUtlVector<CIKTarget,CUtlMemoryFixed<CIKTarget,12u,0>> *)this,0,0xc);
memset(this,0,*(int *)(this + 0xff0) * 0x154);
iVar4 = 0;
pCVar6 = this;
if (0 < *(int *)(this + 0xff0)) {
do {
*(undefined4 *)(pCVar6 + 0xd0) = 0xffffd8f1;
iVar4 = iVar4 + 1;
pCVar6 = pCVar6 + 0x154;
} while (iVar4 < *(int *)(this + 0xff0));
}
}
local_40 = param_5;
if (((local_44 * param_5 <= 0.999) || (local_9c == 6)) ||
(*(undefined4 *)(*(int *)(this + 0xffc) + 0xc + local_98 * 0x14) = 0, local_9c != 4))
{
this_00 = (CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>> *)
(local_98 * 0x14 + *(int *)(this + 0xffc));
iVar4 = *(int *)(this_00 + 0xc);
CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>::GrowVector(this_00,1)
;
CUtlVector<ikcontextikrule_t,CUtlMemory<ikcontextikrule_t,int>>::ShiftElementsRight
(this_00,iVar4,1);
puVar5 = (undefined4 *)
(iVar4 * 0x84 + *(int *)(*(int *)(this + 0xffc) + local_98 * 0x14));
*puVar5 = local_a0;
puVar5[1] = local_9c;
puVar5[2] = local_98;
puVar5[3] = local_94;
puVar5[4] = local_90;
puVar5[5] = local_8c;
puVar5[6] = local_88;
puVar5[7] = local_84;
puVar5[8] = local_80;
puVar5[9] = local_7c;
puVar5[10] = local_78;
puVar5[0xb] = local_74;
puVar5[0xc] = local_70;
puVar5[0xd] = local_6c;
puVar5[0xe] = local_68;
puVar5[0xf] = local_64;
puVar5[0x10] = local_60;
puVar5[0x11] = local_5c;
puVar5[0x12] = local_58;
puVar5[0x13] = local_54;
puVar5[0x14] = local_50;
puVar5[0x15] = local_4c;
puVar5[0x16] = local_48;
puVar5[0x17] = local_44;
puVar5[0x18] = local_40;
puVar5[0x19] = local_3c;
puVar5[0x1a] = local_38;
puVar5[0x1b] = local_34;
puVar5[0x1c] = local_30;
puVar5[0x1d] = local_2c;
puVar5[0x1e] = local_28;
puVar5[0x1f] = local_24;
puVar5[0x20] = local_20;
}
}
}
iVar7 = iVar7 + 1;
} while (iVar7 < *(int *)(param_1 + 0x90));
return;
}
}
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.