CTerrorPlayerAnimState::HandleActivity_Incapacitated
0x00512120 · 1087 bytes · __thiscall
_ZN22CTerrorPlayerAnimState28HandleActivity_IncapacitatedEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::HandleActivity_Incapacitated() */
int __thiscall CTerrorPlayerAnimState::HandleActivity_Incapacitated(CTerrorPlayerAnimState *this)
{
uint uVar1;
code *pcVar2;
char cVar3;
int iVar4;
int *piVar5;
undefined *puVar6;
float fVar7;
CAI_Concept local_24 [20];
cVar3 = (**(code **)(**(int **)(this + 0x118) + 0x7e8))(*(int **)(this + 0x118));
if (cVar3 == '\0') {
return -1;
}
if ((&DAT_000039f1)[*(int *)(this + 0x118)] != '\0') {
uVar1 = *(uint *)(*(int *)(this + 0x118) + 0x2e24);
if ((((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)) {
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (3 < iVar4 - 0x2c8U) {
(**(code **)(*(int *)this + 0x38))(this);
return 0x2c8;
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar4 == 0x2c8) && (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99)) {
return 0x2c8;
}
fVar7 = ((float)*(int *)(*(int *)(this + 0x118) + 0x100) /
*(float *)(SurvivorLedgeGrabHealth._28_4_ + 0x2c)) * 100.0;
if (fVar7 < 33.3) {
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 != 0x2cb) {
(**(code **)(*(int *)(*(int *)(this + 0x118) + 0x3ab4) + 0x118))
(*(int *)(this + 0x118) + 0x3ab4);
pcVar2 = *(code **)(**(int **)(this + 0x118) + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"PlayerLedgeHangEnd");
(*pcVar2)(*(undefined4 *)(this + 0x118),local_24,1,0,0,0,0);
return 0x2cb;
}
return 0x2cb;
}
if (fVar7 < 66.6) {
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 != 0x2ca) {
(**(code **)(*(int *)(*(int *)(this + 0x118) + 0x3ab4) + 0x114))
(*(int *)(this + 0x118) + 0x3ab4);
pcVar2 = *(code **)(**(int **)(this + 0x118) + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"PlayerLedgeHangMiddle");
(*pcVar2)(*(undefined4 *)(this + 0x118),local_24,1,0,0,0,0);
return 0x2ca;
}
return 0x2ca;
}
return 0x2c9;
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar4 != 0x2c6) &&
(iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this),
iVar4 != 0x2c7)) {
(**(code **)(*(int *)this + 0x38))(this);
return 0x2c7 - (uint)(*(char *)(*(int *)(this + 0x118) + 0x1a90) == '\0');
}
LAB_00512440:
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
return iVar4;
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 == 0x305) {
if (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99) {
return 0x305;
}
}
else {
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar4 == 0x216) ||
(iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this),
iVar4 == 0x215)) goto LAB_00512393;
uVar1 = *(uint *)(*(int *)(this + 0x118) + 0x2e24);
if ((uVar1 != 0xffffffff) &&
(((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)))) {
cVar3 = *(char *)(*(int *)(this + 0x118) + 0x1a90);
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (0x2ba - (uint)(cVar3 == '\0') != iVar4) {
(**(code **)(*(int *)this + 0x38))(this);
}
return 0x2ba - (uint)(*(char *)(*(int *)(this + 0x118) + 0x1a90) == '\0');
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if ((iVar4 == 700) ||
(iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this),
iVar4 == 0x2bd)) {
if (0.99 < *(float *)(*(int *)(this + 0x118) + 0x490)) {
(**(code **)(*(int *)this + 0x38))(this);
}
goto LAB_00512440;
}
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 != 0x14) {
iVar4 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar4 != 0x14) {
(**(code **)(*(int *)this + 0x38))(this);
}
return 0x14;
}
if (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99) {
return 0x14;
}
}
(**(code **)(*(int *)this + 0x38))(this);
LAB_00512393:
piVar5 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(*(CTerrorPlayer **)(this + 0x118));
if ((piVar5 == (int *)0x0) || (cVar3 = (**(code **)(*piVar5 + 0x674))(piVar5), cVar3 == '\0')) {
iVar4 = 700;
}
else {
iVar4 = 0x2bd;
}
return iVar4;
}
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.