CAnimationLayer::StudioFrameAdvance
0x005ebbb0 · 1522 bytes · __thiscall
_ZN15CAnimationLayer18StudioFrameAdvanceEfP14CBaseAnimating
Decompiled
undefined (3 params)
/* CAnimationLayer::StudioFrameAdvance(float, CBaseAnimating*) */
void __thiscall
CAnimationLayer::StudioFrameAdvance(CAnimationLayer *this,float param_1,CBaseAnimating *param_2)
{
undefined4 uVar1;
int iVar2;
CBaseEdict *pCVar3;
int iVar4;
CStudioHdr *pCVar5;
CStudioHdr *pCVar6;
longdouble lVar7;
float fVar8;
float fVar9;
pCVar5 = *(CStudioHdr **)(param_2 + 0x13e0);
iVar2 = *(int *)(this + 8);
if (pCVar5 == (CStudioHdr *)0x0) {
iVar4 = CBaseEntity::GetModel((CBaseEntity *)param_2);
if (iVar4 == 0) {
pCVar5 = *(CStudioHdr **)(param_2 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(param_2);
pCVar5 = *(CStudioHdr **)(param_2 + 0x13e0);
}
pCVar6 = (CStudioHdr *)0x0;
if (pCVar5 != (CStudioHdr *)0x0) goto LAB_005ebbd0;
}
else {
LAB_005ebbd0:
pCVar6 = (CStudioHdr *)0x0;
if (*(int *)pCVar5 != 0) {
pCVar6 = pCVar5;
}
}
lVar7 = (longdouble)CBaseAnimating::GetSequenceCycleRate(param_2,pCVar6,iVar2);
fVar8 = *(float *)(this + 0xc);
fVar9 = fVar8;
if (fVar8 != *(float *)(this + 0x10)) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
lVar7 = (longdouble)(float)lVar7;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
fVar9 = *(float *)(this + 0xc);
}
*(float *)(this + 0x10) = fVar8;
}
fVar8 = param_1 * *(float *)(this + 0x18) * (float)lVar7 + fVar9;
if (fVar8 == fVar9) {
fVar8 = fVar9;
if (0.0 <= fVar9) goto LAB_005ebc27;
LAB_005ebe08:
if (this[5] == (CAnimationLayer)0x0) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(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 *)(this + 0xc) = 0;
goto LAB_005ebc5d;
}
}
else {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
*(float *)(this + 0xc) = fVar8;
if (fVar8 < 0.0) goto LAB_005ebe08;
LAB_005ebc27:
if (fVar8 < 1.0) goto LAB_005ebc5d;
this[4] = (CAnimationLayer)0x1;
if (this[5] == (CAnimationLayer)0x0) {
if (fVar8 != 1.0) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(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 *)(this + 0xc) = 0x3f800000;
}
goto LAB_005ebc5d;
}
}
if (fVar8 - (float)(int)fVar8 != fVar8) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
*(float *)(this + 0xc) = fVar8 - (float)(int)fVar8;
}
LAB_005ebc5d:
fVar8 = *(float *)(this + 0x1c);
if ((fVar8 != 0.0) || (*(float *)(this + 0x20) != 0.0)) {
fVar9 = *(float *)(this + 0x14);
if (fVar9 != 1.0) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
fVar8 = *(float *)(this + 0x1c);
}
fVar9 = 1.0;
*(undefined4 *)(this + 0x14) = 0x3f800000;
}
if (((fVar8 != 0.0) && (*(float *)(this + 0xc) < fVar8)) &&
(fVar8 = *(float *)(this + 0xc) / fVar8, fVar8 != fVar9)) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
*(float *)(this + 0x14) = fVar8;
fVar9 = fVar8;
}
fVar8 = *(float *)(this + 0x20);
if (((fVar8 != 0.0) && (1.0 - fVar8 < *(float *)(this + 0xc))) &&
(fVar8 = (1.0 - *(float *)(this + 0xc)) / fVar8, fVar8 != fVar9)) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
*(float *)(this + 0x14) = fVar8;
fVar9 = fVar8;
}
fVar8 = fVar9 * fVar9 * 3.0 - (fVar9 + fVar9) * fVar9 * fVar9;
if (fVar8 == fVar9) {
iVar2 = *(int *)(this + 8);
}
else {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
iVar2 = *(int *)(this + 8);
*(float *)(this + 0x14) = fVar8;
}
if ((iVar2 == 0) && (*(float *)(this + 0x14) != 0.0)) {
iVar2 = *(int *)(this + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(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 *)(this + 0x14) = 0;
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.