CBaseAnimating::ResetSequenceInfo
0x005e2f70 · 538 bytes · __thiscall
_ZN14CBaseAnimating17ResetSequenceInfoEv
Decompiled
undefined (1 param)
/* CBaseAnimating::ResetSequenceInfo() */
void __thiscall CBaseAnimating::ResetSequenceInfo(CBaseAnimating *this)
{
CBaseEdict *pCVar1;
byte bVar2;
int iVar3;
mstudioseqdesc_t *pmVar4;
CStudioHdr *this_00;
uint uVar5;
longdouble lVar6;
if ((*(int *)(ai_sequence_debug._28_4_ + 0x30) == 0) || (((byte)this[0x111] & 0x10) == 0)) {
iVar3 = *(int *)(this + 0x494);
}
else {
DevMsg("ResetSequenceInfo");
iVar3 = *(int *)(this + 0x494);
}
if (iVar3 == -1) {
SetSequence(this,0);
}
this_00 = *(CStudioHdr **)(this + 0x13e0);
if (this_00 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar3 == 0) {
this_00 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
this_00 = *(CStudioHdr **)(this + 0x13e0);
}
if (this_00 != (CStudioHdr *)0x0) goto LAB_005e2fb0;
}
else {
LAB_005e2fb0:
if (*(int *)this_00 != 0) {
lVar6 = (longdouble)
(**(code **)(*(int *)this + 0x33c))(this,this_00,*(undefined4 *)(this + 0x494));
*(float *)(this + 0x440) = (float)lVar6;
bVar2 = GetSequenceFlags(this_00,*(int *)(this + 0x494));
this[0x489] = (CBaseAnimating)(bVar2 & 1);
this[0x489] = (CBaseAnimating)((byte)this[0x489] & 1);
goto LAB_005e3005;
}
}
*(undefined4 *)(this + 0x440) = 0;
this_00 = (CStudioHdr *)0x0;
this[0x489] = (CBaseAnimating)0x0;
LAB_005e3005:
if (*(float *)(this + 0x468) != 1.0) {
if (this[0x6c] == (CBaseAnimating)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseAnimating)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x468) = 0x3f800000;
}
this[0x488] = (CBaseAnimating)0x0;
*(undefined4 *)(this + 0x444) = 0;
uVar5 = *(uint *)(this + 0x50c) + 1 & 7;
if (*(uint *)(this + 0x50c) != uVar5) {
if (this[0x6c] == (CBaseAnimating)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseAnimating)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x50c) = uVar5;
}
uVar5 = *(uint *)(this + 0x510) + 1 & 7;
if (*(uint *)(this + 0x510) != uVar5) {
if (this[0x6c] == (CBaseAnimating)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseAnimating)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x510) = uVar5;
}
if (this_00 == (CStudioHdr *)0x0) {
return;
}
pmVar4 = (mstudioseqdesc_t *)CStudioHdr::pSeqdesc(this_00,*(int *)(this + 0x494));
SetEventIndexForSequence(pmVar4);
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.