CBaseAnimatingOverlay::StudioFrameAdvance
0x005ee520 · 1013 bytes · __thiscall
_ZN21CBaseAnimatingOverlay18StudioFrameAdvanceEv
Decompiled
undefined (1 param)
/* CBaseAnimatingOverlay::StudioFrameAdvance() */
void __thiscall CBaseAnimatingOverlay::StudioFrameAdvance(CBaseAnimatingOverlay *this)
{
undefined4 *puVar1;
undefined4 uVar2;
float fVar3;
CBaseEdict *pCVar4;
byte *pbVar5;
undefined4 uVar6;
int iVar7;
uint uVar8;
CAnimationLayer *this_00;
int iVar9;
int iVar10;
int iVar11;
longdouble lVar12;
float fVar13;
float fVar14;
iVar11 = 0;
lVar12 = (longdouble)CBaseAnimating::GetAnimTimeInterval((CBaseAnimating *)this);
fVar3 = (float)lVar12;
CBaseAnimating::StudioFrameAdvance((CBaseAnimating *)this);
if (0 < *(int *)(this + 0x1400)) {
iVar10 = 0;
do {
while( true ) {
this_00 = (CAnimationLayer *)(*(int *)(this + 0x13f4) + iVar10);
uVar8 = *(uint *)this_00;
if ((uVar8 & 1) == 0) break;
if ((uVar8 & 4) != 0) {
if (*(float *)(this_00 + 0x28) <= 0.0) {
fVar13 = *(float *)(this_00 + 0x14);
if (fVar13 == 0.0) {
if ((*(int *)(ai_sequence_debug._28_4_ + 0x30) != 0) &&
(((byte)this[0x111] & 0x10) != 0)) {
fVar13 = *(float *)(this_00 + 0xc);
uVar6 = CBaseAnimating::GetSequenceName
((CBaseAnimating *)this,*(int *)(this_00 + 8));
Msg("removing %d (%d): %s : %5.3f (%.3f)\n",iVar11,*(undefined4 *)(this_00 + 0x3c),
uVar6,(double)fVar13,0);
}
FastRemoveLayer(this,iVar11);
*(uint *)this_00 = *(uint *)this_00 | 0x20;
goto LAB_005ee5c6;
}
fVar14 = fVar13 - fVar3 * *(float *)(this_00 + 0x24);
if (fVar13 != fVar14) {
iVar9 = *(int *)(this_00 + 0x48);
if (iVar9 != 0) {
if (*(char *)(iVar9 + 0x6c) == '\0') {
pCVar4 = *(CBaseEdict **)(iVar9 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
*(byte *)(iVar9 + 0x70) = *(byte *)(iVar9 + 0x70) | 1;
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar9 + 0x78) = 0;
*(undefined4 *)(iVar9 + 0x74) = uVar6;
}
*(float *)(this_00 + 0x14) = fVar14;
fVar13 = fVar14;
}
uVar6 = 0x3f800000;
if ((1.0 < fVar13) || (uVar6 = 0, fVar13 < 0.0)) {
iVar9 = *(int *)(this_00 + 0x48);
if (iVar9 != 0) {
if (*(char *)(iVar9 + 0x6c) == '\0') {
pCVar4 = *(CBaseEdict **)(iVar9 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
*(byte *)(iVar9 + 0x70) = *(byte *)(iVar9 + 0x70) | 1;
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar9 + 0x78) = 0;
*(undefined4 *)(iVar9 + 0x74) = uVar2;
}
*(undefined4 *)(this_00 + 0x14) = uVar6;
}
}
else {
fVar13 = *(float *)(this_00 + 0x28) - fVar3;
if (fVar13 <= 0.0) {
fVar13 = 0.0;
}
if (1.0 <= fVar13) {
fVar13 = 1.0;
}
*(float *)(this_00 + 0x28) = fVar13;
}
}
CAnimationLayer::StudioFrameAdvance(this_00,fVar3,(CBaseAnimating *)this);
if ((this_00[4] != (CAnimationLayer)0x0) && (uVar8 = *(uint *)this_00, (uVar8 & 2) != 0)) {
if (*(float *)(this_00 + 0x14) != 0.0) {
iVar9 = *(int *)(this_00 + 0x48);
if (iVar9 != 0) {
if (*(char *)(iVar9 + 0x6c) == '\0') {
pCVar4 = *(CBaseEdict **)(iVar9 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
*(byte *)(iVar9 + 0x70) = *(byte *)(iVar9 + 0x70) | 1;
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar9 + 0x78) = 0;
*(undefined4 *)(iVar9 + 0x74) = uVar6;
uVar8 = *(uint *)this_00;
}
*(undefined4 *)(this_00 + 0x14) = 0;
}
*(uint *)this_00 = uVar8 | 4;
}
LAB_005ee5c6:
iVar11 = iVar11 + 1;
iVar10 = iVar10 + 0x4c;
if (*(int *)(this + 0x1400) <= iVar11) goto LAB_005ee603;
}
if ((uVar8 & 0x20) == 0) {
if (0.0 < *(float *)(this_00 + 0x14)) {
CAnimationLayer::Init(this_00,this);
*(uint *)this_00 = *(uint *)this_00 | 0x20;
}
goto LAB_005ee5c6;
}
iVar11 = iVar11 + 1;
iVar10 = iVar10 + 0x4c;
*(uint *)this_00 = uVar8 & 0xffffffdf;
} while (iVar11 < *(int *)(this + 0x1400));
}
LAB_005ee603:
if (((*(int *)(ai_sequence_debug._28_4_ + 0x30) != 0) && (((byte)this[0x111] & 0x10) != 0)) &&
(0 < *(int *)(this + 0x1400))) {
iVar10 = 0;
iVar11 = 0;
do {
while (pbVar5 = (byte *)(*(int *)(this + 0x13f4) + iVar10), (*pbVar5 & 1) != 0) {
fVar3 = *(float *)(pbVar5 + 0x14);
fVar13 = *(float *)(pbVar5 + 0xc);
uVar6 = CBaseAnimating::GetSequenceName((CBaseAnimating *)this,*(int *)(pbVar5 + 8));
puVar1 = (undefined4 *)(*(int *)(this + 0x13f4) + 0x3c + iVar10);
iVar9 = iVar11 + 1;
iVar10 = iVar10 + 0x4c;
Msg(" %d (%d): %s : %5.3f (%.3f)\n",iVar11,*puVar1,uVar6,(double)fVar13,(double)fVar3);
iVar11 = iVar9;
if (*(int *)(this + 0x1400) <= iVar9) {
return;
}
}
iVar11 = iVar11 + 1;
iVar10 = iVar10 + 0x4c;
} while (iVar11 < *(int *)(this + 0x1400));
}
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.