CTerrorPlayerAnimState::HandleActivity_HitByCharger
0x00511360 · 461 bytes · __thiscall
_ZN22CTerrorPlayerAnimState27HandleActivity_HitByChargerEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::HandleActivity_HitByCharger() */
undefined4 __thiscall
CTerrorPlayerAnimState::HandleActivity_HitByCharger(CTerrorPlayerAnimState *this)
{
float fVar1;
float fVar2;
float fVar3;
CBaseEntity *this_00;
int iVar4;
CBaseEntity *this_01;
undefined4 uVar5;
float fVar6;
float fVar7;
if (this[0x158] == (CTerrorPlayerAnimState)0x0) {
return 0xffffffff;
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar4 == 0x20c) ||
(iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this), iVar4 == 0x20d)
) {
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 + 0x274);
fVar2 = *(float *)(this_00 + 0x278);
fVar3 = *(float *)(this_00 + 0x27c);
if ((fVar1 != 0.0) || (fVar6 = 15.0, fVar2 != 0.0)) {
fVar6 = 5.0;
}
iVar4 = CBaseEntity::GetGroundEntity(this_01);
if ((iVar4 != 0) ||
((fVar7 = *(float *)(*(int *)(this + 0x118) + 0x490), fVar7 < 0.25 &&
(SQRT(fVar2 * fVar2 + fVar1 * fVar1 + fVar3 * fVar3) < fVar6)))) {
(**(code **)(*(int *)this + 0x38))(this);
goto LAB_00511478;
}
}
else {
fVar7 = *(float *)(*(int *)(this + 0x118) + 0x490);
}
if (0.99 < fVar7) {
(**(code **)(*(int *)this + 0x38))(this);
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 == 0x20d) {
LAB_00511478:
CTerrorPlayer::OnKnockedDown(*(CTerrorPlayer **)(this + 0x118),3);
return 0x20e;
}
if (iVar4 == 0x20e) {
this[0x158] = (CTerrorPlayerAnimState)0x0;
return 0xffffffff;
}
if (iVar4 == 0x20c) {
return 0x20d;
}
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (2 < iVar4 - 0x20cU) {
(**(code **)(*(int *)this + 0x38))(this);
return 0x20c;
}
uVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
return uVar5;
}
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.