CTerrorPlayerAnimState::UpdateFidgeting
0x005131c0 · 442 bytes · __thiscall
_ZN22CTerrorPlayerAnimState15UpdateFidgetingEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::UpdateFidgeting() */
void __thiscall CTerrorPlayerAnimState::UpdateFidgeting(CTerrorPlayerAnimState *this)
{
code *pcVar1;
char cVar2;
int iVar3;
int *piVar4;
undefined4 uVar5;
longdouble lVar6;
float fVar7;
if (this[0x180] == (CTerrorPlayerAnimState)0x0) {
lVar6 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x18c) <= (float)lVar6) {
iVar3 = RandomInt(*(undefined4 *)(fidget_min_interval._28_4_ + 0x30),
*(undefined4 *)(fidget_max_interval._28_4_ + 0x30));
fVar7 = (float)iVar3;
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + fVar7 != *(float *)(this + 0x18c)) {
(**(code **)(*(int *)(this + 0x184) + 4))(this + 0x184,this + 0x18c);
*(float *)(this + 0x18c) = (float)lVar6 + fVar7;
}
if (fVar7 != *(float *)(this + 0x188)) {
(**(code **)(*(int *)(this + 0x184) + 4))(this + 0x184,this + 0x188);
*(float *)(this + 0x188) = fVar7;
}
piVar4 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(*(CTerrorPlayer **)(this + 0x118));
if ((piVar4 != (int *)0x0) && (cVar2 = (**(code **)(*piVar4 + 0x68c))(piVar4), cVar2 == '\0'))
{
return;
}
if (((((((byte)(*(CTerrorPlayer **)(this + 0x118))[0x150] & 0x20) == 0) &&
(lVar6 = (longdouble)
CTerrorPlayer::GetTimeSinceLastFiredWeapon(*(CTerrorPlayer **)(this + 0x118)),
4.0 <= (float)lVar6)) && (this[0x161] == (CTerrorPlayerAnimState)0x0)) &&
((this[0x159] == (CTerrorPlayerAnimState)0x0 &&
(this[0x15d] == (CTerrorPlayerAnimState)0x0)))) &&
((this[0x162] == (CTerrorPlayerAnimState)0x0 &&
(this[0x166] == (CTerrorPlayerAnimState)0x0)))) {
pcVar1 = *(code **)(*(int *)this + 0x1c);
uVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
iVar3 = (*pcVar1)(this,uVar5);
if ((iVar3 == 6) || (iVar3 == 1)) {
(**(code **)(**(int **)(this + 0x118) + 0x7fc))(*(int **)(this + 0x118),0x62,0);
}
}
}
}
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.