CBaseCombatCharacter::GetDeathActivity
0x005f1f70 · 1455 bytes · __thiscall
_ZN20CBaseCombatCharacter16GetDeathActivityEv
Decompiled
undefined (1 param)
/* CBaseCombatCharacter::GetDeathActivity() */
int __thiscall CBaseCombatCharacter::GetDeathActivity(CBaseCombatCharacter *this)
{
float fVar1;
float fVar2;
float fVar3;
char cVar4;
undefined4 uVar5;
float *pfVar6;
int iVar7;
undefined1 *puVar8;
int iVar9;
float fVar10;
undefined1 *local_e0 [2];
float local_d8;
float local_d4;
float local_d0;
CTraceFilterSimple local_cc [16];
float local_bc;
float local_b8;
float local_b4;
float local_ac;
float local_a8;
float local_a4;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_8c;
undefined4 local_88;
undefined4 local_84;
undefined4 local_7c;
undefined1 local_78;
undefined1 local_77;
Vector local_60 [12];
Vector local_54 [32];
float local_34;
cVar4 = (**(code **)(*(int *)this + 0x16c))(this);
if (cVar4 != '\0') {
uVar5 = (**(code **)(*random_valve + 8))(random_valve,0,7);
switch(uVar5) {
case 0:
goto switchD_005f1faf_caseD_0;
case 1:
goto switchD_005f1faf_caseD_1;
case 2:
return 0x16;
case 3:
return 0x17;
case 4:
return 0x70;
case 5:
return 0x71;
case 6:
return 0x72;
case 7:
return 0x73;
}
}
pfVar6 = (float *)(**(code **)(*(int *)this + 0x288))(this);
fVar1 = *pfVar6;
fVar2 = pfVar6[1];
fVar3 = pfVar6[2];
AngleVectors((QAngle *)(this + 0x3a8),(Vector *)&local_d8);
fVar10 = -(DAT_00fe36b8 * local_d4 + g_vecAttackDir * local_d8 + DAT_00fe36bc * local_d0);
local_bc = fVar1;
local_b8 = fVar2;
local_b4 = fVar3;
if (*(int *)(this + 0x1838) == 1) {
iVar9 = 0x70;
LAB_005f20c5:
iVar7 = (**(code **)(*(int *)this + 0x340))(this,iVar9);
if (iVar7 == -1) {
if (fVar10 <= 0.3) {
if (fVar10 <= -0.3) {
iVar9 = 0x15;
}
goto LAB_005f22b5;
}
iVar9 = (**(code **)(*(int *)this + 0x340))(this,0x16);
if (iVar9 != -1) {
LAB_005f2120:
local_ac = local_d8 * 64.0;
local_a8 = local_d4 * 64.0;
local_78 = 0;
local_a4 = local_d0 * 64.0;
local_7c = 0;
local_8c = 0x41800000;
local_88 = 0x41800000;
local_84 = 0x41900000;
local_9c = 0;
local_98 = 0;
local_94 = 0;
local_77 = local_a8 * local_a8 + local_ac * local_ac + local_a4 * local_a4 != 0.0;
CTraceFilterSimple::CTraceFilterSimple
(local_cc,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_bc,0x200400b,local_cc,local_60);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_60,local_54,0xff,0xff,0,true,-1.0);
}
return (uint)(local_34 == 1.0) * 2 + 0x14;
}
}
else {
LAB_005f22b5:
iVar7 = (**(code **)(*(int *)this + 0x340))(this,iVar9);
if (iVar7 != -1) goto LAB_005f20ae;
}
LAB_005f22d0:
iVar9 = (**(code **)(*(int *)this + 0x340))(this,0x14);
if (iVar9 == -1) {
(**(code **)(*(int *)this + 0x20))(local_e0,this);
puVar8 = &DAT_00d539c2;
if (local_e0[0] != (undefined1 *)0x0) {
puVar8 = local_e0[0];
}
Msg("ERROR! %s missing ACT_DIESIMPLE\n",puVar8);
}
}
else {
if (*(int *)(this + 0x1838) == 3) {
iVar9 = 0x72;
goto LAB_005f20c5;
}
iVar9 = 0x16;
if (fVar10 <= 0.3) {
iVar9 = 0x15 - (uint)(-0.3 < fVar10);
}
iVar7 = (**(code **)(*(int *)this + 0x340))(this,iVar9);
if (iVar7 == -1) {
iVar9 = 0x14;
goto LAB_005f22b5;
}
iVar7 = (**(code **)(*(int *)this + 0x340))(this,iVar9);
if (iVar7 == -1) goto LAB_005f22d0;
if (iVar9 == 0x16) goto LAB_005f2120;
LAB_005f20ae:
if (iVar9 != 0x15) {
return iVar9;
}
local_78 = 0;
local_7c = 0;
local_8c = 0x41800000;
local_88 = 0x41800000;
local_84 = 0x41900000;
local_a8 = (fVar2 - local_d4 * 64.0) - fVar2;
local_a4 = (fVar3 - local_d0 * 64.0) - fVar3;
local_ac = (fVar1 - local_d8 * 64.0) - fVar1;
local_9c = 0;
local_98 = 0;
local_94 = 0;
local_77 = local_a8 * local_a8 + local_ac * local_ac + local_a4 * local_a4 != 0.0;
CTraceFilterSimple::CTraceFilterSimple
(local_cc,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_bc,0x200400b,local_cc,local_60);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_60,local_54,0xff,0xff,0,true,-1.0);
}
if (local_34 == 1.0) {
switchD_005f1faf_caseD_1:
return 0x15;
}
}
switchD_005f1faf_caseD_0:
return 0x14;
}
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.