CTerrorPlayerAnimState::HandleActivity_PunchedByTank
0x005119e0 · 530 bytes · __thiscall
_ZN22CTerrorPlayerAnimState28HandleActivity_PunchedByTankEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::HandleActivity_PunchedByTank() */
undefined4 __thiscall
CTerrorPlayerAnimState::HandleActivity_PunchedByTank(CTerrorPlayerAnimState *this)
{
float fVar1;
float fVar2;
float fVar3;
CBaseEntity *this_00;
char cVar4;
int iVar5;
CBaseEntity *this_01;
undefined4 uVar6;
float fVar7;
if (this[0x15f] == (CTerrorPlayerAnimState)0x0) {
return 0xffffffff;
}
iVar5 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 0x118));
cVar4 = IsASurvivorTeam(iVar5);
if (cVar4 != '\0') {
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar5 == 0x209) ||
(iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this),
iVar5 == 0x20a)) {
this_00 = *(CBaseEntity **)(this + 0x118);
this_01 = this_00;
if (((byte)this_00[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(this_00);
this_01 = *(CBaseEntity **)(this + 0x118);
}
fVar1 = *(float *)(this_00 + 0x278);
fVar2 = *(float *)(this_00 + 0x27c);
fVar3 = *(float *)(this_00 + 0x274);
iVar5 = CBaseEntity::GetGroundEntity(this_01);
if ((iVar5 != 0) ||
((fVar7 = *(float *)(*(int *)(this + 0x118) + 0x490), fVar7 < 0.25 &&
(SQRT(fVar1 * fVar1 + fVar2 * fVar2 + fVar3 * fVar3) < 5.0)))) {
(**(code **)(*(int *)this + 0x38))(this);
return 0x20b;
}
}
else {
fVar7 = *(float *)(*(int *)(this + 0x118) + 0x490);
}
if (fVar7 <= 0.99) {
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar5 != 0x20b) ||
((this[0x166] == (CTerrorPlayerAnimState)0x0 &&
(((*(float *)(*(CTerrorPlayer **)(this + 0x118) + 0x490) <= 0.5 ||
(cVar4 = CTerrorPlayer::IsGettingUp(*(CTerrorPlayer **)(this + 0x118)), cVar4 != '\0'))
|| ((*(uint *)(*(int *)(this + 0x118) + 0x1cb0) & 0x61a) == 0)))))) goto LAB_00511b17;
}
else {
(**(code **)(*(int *)this + 0x38))(this);
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar5 == 0x20a) {
return 0x20b;
}
if (iVar5 != 0x20b) {
if (iVar5 == 0x209) {
return 0x20a;
}
LAB_00511b17:
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar5 - 0x209U < 3) {
uVar6 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
return uVar6;
}
(**(code **)(*(int *)this + 0x38))(this);
return 0x209;
}
}
}
this[0x15f] = (CTerrorPlayerAnimState)0x0;
return 0xffffffff;
}
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.