CMultiPlayerAnimState::DebugShowAnimState
0x0046cd60 · 1062 bytes · __thiscall
_ZN21CMultiPlayerAnimState18DebugShowAnimStateEi
Decompiled
undefined (2 params)
/* CMultiPlayerAnimState::DebugShowAnimState(int) */
void __thiscall CMultiPlayerAnimState::DebugShowAnimState(CMultiPlayerAnimState *this,int param_1)
{
float fVar1;
float fVar2;
CBaseEntity *pCVar3;
int iVar4;
undefined4 uVar5;
int iVar6;
CStudioHdr *pCVar7;
CStudioHdr *pCVar8;
float fVar9;
double dVar10;
float local_7c;
float local_78;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
float local_64;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
Vector local_4c [12];
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
GetOuterAbsVelocity(this,(Vector *)&local_7c);
Anim_StateLog("----------------- frame %d -----------------\n",*(undefined4 *)(gpGlobals + 4));
pCVar3 = *(CBaseEntity **)(this + 0x1c);
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
fVar1 = *(float *)(pCVar3 + 0x490);
iVar4 = *(int *)(pCVar3 + 0x494);
if (pCVar7 == (CStudioHdr *)0x0) {
iVar6 = CBaseEntity::GetModel(pCVar3);
if (iVar6 == 0) {
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)pCVar3);
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
}
pCVar8 = (CStudioHdr *)0x0;
if (pCVar7 == (CStudioHdr *)0x0) goto LAB_0046cdc9;
}
pCVar8 = (CStudioHdr *)0x0;
if (*(int *)pCVar7 != 0) {
pCVar8 = pCVar7;
}
LAB_0046cdc9:
uVar5 = GetSequenceName(pCVar8,iVar4);
Anim_StatePrintf(param_1,"main: %s, cycle: %.2f\n",uVar5,SUB84((double)fVar1,0),
(int)((ulonglong)(double)fVar1 >> 0x20));
dVar10 = (double)SQRT(local_78 * local_78 + local_7c * local_7c);
Anim_StatePrintf(param_1 + 1,"vel: %.2f, time: %.2f, max: %.2f",SUB84(dVar10,0),
(int)((ulonglong)dVar10 >> 0x20),SUB84((double)*(float *)(gpGlobals + 0xc),0),
(int)((ulonglong)(double)*(float *)(gpGlobals + 0xc) >> 0x20),
(double)*(float *)(this + 0x110));
Anim_StateLog("--------------------------------------------\n\n");
pCVar3 = *(CBaseEntity **)(this + 0x1c);
if (((byte)pCVar3[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar3);
}
local_70 = 0;
fVar1 = *(float *)(pCVar3 + 0x2e0);
local_68 = 0;
fVar2 = *(float *)(pCVar3 + 0x2e4);
fVar9 = *(float *)(pCVar3 + 0x2e8) + 3.0;
local_6c = *(undefined4 *)(this + 0xe4);
AngleVectors((QAngle *)&local_70,(Vector *)&local_64,(Vector *)&local_58,local_4c);
local_20 = local_5c * 80.0 + fVar9;
local_28 = local_64 * 80.0 + fVar1;
local_24 = local_60 * 80.0 + fVar2;
local_34 = fVar1 - local_58 * 5.0;
local_40 = local_58 * 5.0 + fVar1;
local_30 = fVar2 - local_54 * 5.0;
local_3c = local_54 * 5.0 + fVar2;
local_2c = fVar9 - local_50 * 5.0;
local_38 = local_50 * 5.0 + fVar9;
(**(code **)(*debugoverlay + 8))
(debugoverlay,&local_40,&local_34,&local_28,0xff,0,0,0xff,0,0x3c23d70a);
local_6c = *(undefined4 *)(this + 0x24);
AngleVectors((QAngle *)&local_70,(Vector *)&local_64,(Vector *)&local_58,local_4c);
local_20 = local_5c * 80.0 + fVar9;
local_24 = local_60 * 80.0 + fVar2;
local_28 = local_64 * 80.0 + fVar1;
local_34 = fVar1 - local_58 * 5.0;
local_40 = fVar1 + local_58 * 5.0;
local_3c = fVar2 + local_54 * 5.0;
local_30 = fVar2 - local_54 * 5.0;
local_2c = fVar9 - local_50 * 5.0;
local_38 = local_50 * 5.0 + fVar9;
(**(code **)(*debugoverlay + 8))
(debugoverlay,&local_40,&local_34,&local_28,0,0,0xff,0xff,0,0x3c23d70a);
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.