CTerrorPlayerAnimState::HandleActivity_PummeledByCharger
0x00511710 · 660 bytes · __thiscall
_ZN22CTerrorPlayerAnimState32HandleActivity_PummeledByChargerEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::HandleActivity_PummeledByCharger() */
int __thiscall
CTerrorPlayerAnimState::HandleActivity_PummeledByCharger(CTerrorPlayerAnimState *this)
{
int *piVar1;
uint uVar2;
int *piVar3;
char cVar4;
int iVar5;
undefined *puVar6;
if (this[0x159] == (CTerrorPlayerAnimState)0x0) {
if (this[0x15d] == (CTerrorPlayerAnimState)0x0) {
return -1;
}
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
piVar1 = *(int **)(this + 0x118);
uVar2 = piVar1[0xf92];
if ((((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) &&
(piVar3 = *(int **)(puVar6 + 4), piVar3 != (int *)0x0)) {
cVar4 = (**(code **)(*piVar3 + 300))(piVar3);
if (cVar4 == '\0') {
this[0x15d] = (CTerrorPlayerAnimState)0x0;
this[0x159] = (CTerrorPlayerAnimState)0x0;
this[0x15e] = (CTerrorPlayerAnimState)0x0;
return -1;
}
cVar4 = (**(code **)(**(int **)(this + 0x118) + 0x7e8))(*(int **)(this + 0x118));
if (cVar4 != '\0') {
return 0x215;
}
if ((*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99) && (iVar5 - 0x213U < 4)) {
return iVar5;
}
(**(code **)(*(int *)this + 0x14))(this);
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)piVar3[0xa44]);
if (iVar5 == 0x21a) {
return 0x214;
}
if (iVar5 < 0x21b) {
if (iVar5 == 0x219) {
return 0x213;
}
}
else if (iVar5 < 0x21e) {
return 0x216;
}
Msg("I don\'t know how to be a victim\n");
return 0x216;
}
cVar4 = (**(code **)(*piVar1 + 0x7e8))(piVar1);
if ((cVar4 == '\0') && (this[0x166] == (CTerrorPlayerAnimState)0x0)) {
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar5 != 0x20e) goto LAB_00511782;
if (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99) goto LAB_0051178a;
}
this[0x15d] = (CTerrorPlayerAnimState)0x0;
iVar5 = -1;
}
else {
piVar1 = *(int **)(this + 0x118);
uVar2 = piVar1[0xf92];
if ((((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
this[0x15a] = (CTerrorPlayerAnimState)0x0;
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar5 == 0x20f) {
return 0x20f;
}
(**(code **)(*(int *)this + 0x14))(this);
return 0x20f;
}
cVar4 = (**(code **)(*piVar1 + 0x7e8))(piVar1);
if (cVar4 != '\0') {
this[0x159] = (CTerrorPlayerAnimState)0x0;
return -1;
}
iVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar5 == 0x20e) {
if (0.99 < *(float *)(*(int *)(this + 0x118) + 0x490)) {
this[0x159] = (CTerrorPlayerAnimState)0x0;
return 1;
}
}
else {
LAB_00511782:
(**(code **)(*(int *)this + 0x14))(this);
}
LAB_0051178a:
iVar5 = 0x20e;
}
return iVar5;
}
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.