Infected::TraceAttack
0x00a0f0b0 · 4203 bytes · __thiscall
_ZN8Infected11TraceAttackERK15CTakeDamageInfoRK6VectorP10CGameTrace
Decompiled
undefined (4 params)
/* Infected::TraceAttack(CTakeDamageInfo const&, Vector const&, CGameTrace*) */
void __thiscall
Infected::TraceAttack(Infected *this,CTakeDamageInfo *param_1,Vector *param_2,CGameTrace *param_3)
{
CBaseEdict *pCVar1;
CBaseEntity *this_00;
code *pcVar2;
bool bVar3;
char cVar4;
undefined1 uVar5;
int iVar6;
undefined4 uVar7;
int *piVar8;
uint uVar9;
int *piVar10;
CAmmoDef *pCVar11;
int iVar12;
CTerrorMeleeWeapon *this_01;
int iVar13;
undefined *puVar14;
undefined *puVar15;
char *pcVar16;
char *pcVar17;
longdouble lVar18;
float fVar19;
float fVar20;
float fVar21;
CTerrorMeleeWeapon *local_84;
float local_7c;
float local_78;
float local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
uint local_48;
uint local_44;
float local_40;
undefined4 local_3c;
undefined4 local_38;
uint local_34;
undefined4 local_30;
undefined4 local_2c;
int local_28;
undefined4 local_24;
undefined4 local_20;
RememberLastHitGroup(this,param_3);
local_7c = *(float *)param_1;
local_44 = *(uint *)(param_1 + 0x38);
local_40 = *(float *)(param_1 + 0x3c);
local_78 = *(float *)(param_1 + 4);
local_3c = *(undefined4 *)(param_1 + 0x40);
local_74 = *(float *)(param_1 + 8);
local_70 = *(undefined4 *)(param_1 + 0xc);
local_6c = *(undefined4 *)(param_1 + 0x10);
local_68 = *(undefined4 *)(param_1 + 0x14);
local_64 = *(undefined4 *)(param_1 + 0x18);
local_60 = *(undefined4 *)(param_1 + 0x1c);
local_5c = *(undefined4 *)(param_1 + 0x20);
local_58 = *(undefined4 *)(param_1 + 0x24);
local_54 = *(undefined4 *)(param_1 + 0x28);
local_50 = *(undefined4 *)(param_1 + 0x2c);
local_4c = *(undefined4 *)(param_1 + 0x30);
local_48 = *(uint *)(param_1 + 0x34);
local_30 = *(undefined4 *)(param_1 + 0x4c);
uVar9 = *(uint *)(param_1 + 0x48);
local_38 = *(undefined4 *)(param_1 + 0x44);
local_2c = *(undefined4 *)(param_1 + 0x50);
local_24 = *(undefined4 *)(param_1 + 0x58);
local_28 = *(int *)(param_1 + 0x54);
local_20 = *(undefined4 *)(param_1 + 0x5c);
local_34 = uVar9;
if (((uVar9 & 8) != 0) && ((uVar9 & 0x20000002) != 0)) {
uVar7 = 0;
if ((local_48 != 0xffffffff) &&
((puVar14 = g_pEntityList + (local_48 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == local_48 >> 0xc)))) {
uVar7 = *(undefined4 *)(puVar14 + 4);
}
(**(code **)(*(int *)this + 0x564))(this,0x41f00000,uVar7);
uVar9 = *(uint *)(param_1 + 0x48);
}
if (((((uVar9 & 0x20000000) != 0) && (uVar9 = *(uint *)(param_1 + 0x34), uVar9 != 0xffffffff)) &&
(puVar14 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar14 + 8) == uVar9 >> 0xc && (*(int *)(puVar14 + 4) != 0)))) {
iVar13 = (**(code **)(*(int *)this + 0x544))(this);
if (iVar13 == 7) {
if ((mp_gamemode[0x15] & 0x10) == 0) {
pcVar17 = *(char **)(mp_gamemode._28_4_ + 0x24);
if (pcVar17 == (char *)0x0) {
pcVar17 = "";
goto LAB_00a0fbcd;
}
pcVar16 = "mutation12";
if (pcVar17 != "mutation12") goto LAB_00a0fbcd;
LAB_00a0fb5c:
bVar3 = true;
pcVar17 = pcVar16;
}
else {
pcVar17 = "FCVAR_NEVER_AS_STRING";
LAB_00a0fbcd:
iVar13 = _V_stricmp("mutation12",pcVar17);
pcVar16 = pcVar17;
if (iVar13 == 0) goto LAB_00a0fb5c;
bVar3 = false;
}
if (((pcVar17 == "mutation8") || (iVar13 = _V_stricmp("mutation8",pcVar17), iVar13 == 0)) ||
((bVar3 || (cVar4 = CTerrorGameRules::IsRealismMode(), cVar4 != '\0')))) goto LAB_00a0f1c0;
}
uVar7 = 0;
uVar9 = *(uint *)(param_1 + 0x34);
if (((uVar9 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar9 >> 0xc)) {
uVar7 = *(undefined4 *)(puVar14 + 4);
}
lVar18 = (longdouble)(**(code **)(*(int *)(this + 0x1a3c) + 0x124))(this + 0x1a3c,uVar7);
if ((float)lVar18 <= *(float *)(ZombieShotgunBonusDamageRange._28_4_ + 0x2c)) {
fVar19 = 1.0 - (float)lVar18 / *(float *)(ZombieShotgunBonusDamageRange._28_4_ + 0x2c);
local_40 = (*(float *)(ZombieShotgunBonusDamageMultiplier._28_4_ + 0x2c) * local_40 - local_40
) * fVar19 * fVar19 + local_40;
}
}
LAB_00a0f1c0:
if (*(int *)(param_3 + 0x44) == 1) {
local_34 = local_34 | 0x40000000;
}
else if ((local_34 & 0x200000) == 0) {
iVar13 = GetDifficulty();
if (*(int *)(ZombieUseNextDifficultyDamageFactor._28_4_ + 0x30) == 0) {
LAB_00a0f58e:
if (iVar13 == 1) {
local_40 = local_40 * *(float *)(ZombieNonHeadDamageFactorNormal._28_4_ + 0x2c);
}
else if (iVar13 < 2) {
if (iVar13 == 0) goto LAB_00a0fceb;
}
else if (iVar13 == 2) {
local_40 = local_40 * *(float *)(ZombieNonHeadDamageFactorHard._28_4_ + 0x2c);
}
else if (iVar13 == 3) goto LAB_00a0f839;
}
else if (iVar13 < 3) {
if (-2 < iVar13) {
iVar13 = iVar13 + 1;
goto LAB_00a0f58e;
}
LAB_00a0fceb:
local_40 = local_40 * *(float *)(ZombieNonHeadDamageFactorEasy._28_4_ + 0x2c);
}
else {
LAB_00a0f839:
local_40 = local_40 * *(float *)(ZombieNonHeadDamageFactorExpert._28_4_ + 0x2c);
}
local_40 = local_40 * *(float *)(ZombieNonHeadDamageFactorMultiplier._28_4_ + 0x2c);
pCVar11 = (CAmmoDef *)GetAmmoDef();
uVar9 = CAmmoDef::Flags(pCVar11,local_28);
iVar13 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (((iVar13 != 3) || (iVar13 = (**(code **)(*(int *)this + 0x544))(this), iVar13 == 0)) &&
(((uVar9 & 8) != 0 ||
((cVar4 = CTerrorGameRules::IsRealismMode(), cVar4 == '\0' && ((uVar9 & 4) != 0)))))) {
iVar13 = CBaseEntity::GetGender((CBaseEntity *)this);
fVar19 = local_40;
if (iVar13 == 0xe) {
iVar13 = (**(code **)(*(int *)this + 0x1fc))(this);
local_40 = (float)(iVar13 >> 1);
}
else {
iVar13 = (**(code **)(*(int *)this + 0x1fc))(this);
if (fVar19 < (float)iVar13) {
iVar13 = (**(code **)(*(int *)this + 0x1fc))(this);
local_40 = (float)iVar13;
}
}
}
}
if (((*(uint *)(param_1 + 0x48) & 0x40) == 0) ||
(*(float *)(param_1 + 0x3c) * 4.0 < *(float *)(param_1 + 0x40) ||
*(float *)(param_1 + 0x3c) * 4.0 == *(float *)(param_1 + 0x40))) {
iVar13 = IPredictionSystem::g_pPredictionSystems;
if ((*(uint *)(param_1 + 0x48) & 0x5000000) != 0) {
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
goto joined_r0x00a0f3ce;
}
}
else {
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
joined_r0x00a0f3ce:
iVar13 = IPredictionSystem::g_pPredictionSystems;
if ((iVar6 == 3) &&
(iVar6 = (**(code **)(*(int *)this + 0x544))(this),
iVar13 = IPredictionSystem::g_pPredictionSystems, iVar6 != 7)) {
local_40 = (float)*(int *)(this + 0x100);
}
}
for (; iVar13 != 0; iVar13 = *(int *)(iVar13 + 4)) {
*(int *)(iVar13 + 0x10) = *(int *)(iVar13 + 0x10) + 1;
}
/* try { // try from 00a0f250 to 00a0f39d has its CatchHandler @ 00a10154 */
(**(code **)(*(int *)this + 0x580))(this,local_40,(CTakeDamageInfo *)&local_7c,param_2,param_3);
AddMultiDamage((CTakeDamageInfo *)&local_7c,(CBaseEntity *)this);
uVar7 = CBaseEntity::GetGender((CBaseEntity *)this);
piVar8 = (int *)GetDamageCutoutHalfBodyWounds(uVar7);
iVar13 = piVar8[3];
/* try { // try from 00a0f660 to 00a0f827 has its CatchHandler @ 00a10154 */
if (((((local_44 != 0xffffffff) &&
(puVar14 = g_pEntityList + (local_44 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == local_44 >> 0xc)) &&
((piVar10 = *(int **)(puVar14 + 4), piVar10 != (int *)0x0 &&
(piVar10 = (int *)(**(code **)(*piVar10 + 0x188))(piVar10), piVar10 != (int *)0x0)))) &&
(iVar6 = (**(code **)(*piVar10 + 0x638))(piVar10), iVar6 == 0x13)) {
local_84 = (CTerrorMeleeWeapon *)0x0;
if (((local_44 != 0xffffffff) &&
(puVar14 = g_pEntityList + (local_44 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& ((*(uint *)(puVar14 + 8) == local_44 >> 0xc && (*(int *)(puVar14 + 4) != 0)))) {
local_84 = (CTerrorMeleeWeapon *)
__dynamic_cast(*(int *)(puVar14 + 4),&CBaseEntity::typeinfo,
&CTerrorMeleeWeapon::typeinfo,0);
}
iVar6 = CTerrorMeleeWeapon::GetMeleeWeaponInfo(local_84);
if ((*(char *)(iVar6 + 300) != '\0') &&
(cVar4 = CheckForCustomWoundEffect(this,0x40,*(int *)(param_3 + 0x50)), cVar4 != '\0')) {
if ((local_34 & 4) == 0) {
fVar19 = *(float *)(z_gib_force_factor._28_4_ + 0x2c);
if ((local_34 & 0x80) == 0) {
fVar21 = local_7c * fVar19;
fVar20 = local_78 * fVar19;
fVar19 = fVar19 * local_74;
if (((fVar21 != *(float *)(this + 0x1cdc)) || (fVar20 != *(float *)(this + 0x1ce0))) ||
(fVar19 != *(float *)(this + 0x1ce4))) {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1ce4) = fVar19;
*(float *)(this + 0x1cdc) = fVar21;
*(float *)(this + 0x1ce0) = fVar20;
}
}
else {
fVar21 = local_7c * fVar19;
fVar20 = local_78 * fVar19;
fVar19 = fVar19 * local_74 + 300.0;
if (((fVar21 != *(float *)(this + 0x1cdc)) || (fVar20 != *(float *)(this + 0x1ce0))) ||
(fVar19 != *(float *)(this + 0x1ce4))) {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1ce4) = fVar19;
*(float *)(this + 0x1cdc) = fVar21;
*(float *)(this + 0x1ce0) = fVar20;
}
}
}
else {
/* try { // try from 00a0fe00 to 00a0ffd0 has its CatchHandler @ 00a10154 */
lVar18 = (longdouble)RandomFloat(0x43c80000,0x43fa0000);
fVar20 = local_7c * 0.05;
fVar21 = local_78 * 0.05;
fVar19 = local_74 * 0.05 + (float)lVar18;
if (((fVar20 != *(float *)(this + 0x1cdc)) || (fVar21 != *(float *)(this + 0x1ce0))) ||
(fVar19 != *(float *)(this + 0x1ce4))) {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1ce0) = fVar21;
*(float *)(this + 0x1cdc) = fVar20;
*(float *)(this + 0x1ce4) = fVar19;
}
}
uVar9 = *(uint *)(param_1 + 0x34);
/* try { // try from 00a10017 to 00a1011f has its CatchHandler @ 00a10154 */
if (((((uVar9 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar9 >> 0xc)) &&
((piVar8 = *(int **)(puVar14 + 4), piVar8 != (int *)0x0 && (this[0x1d88] == (Infected)0x0)
))) && ((cVar4 = (**(code **)(*piVar8 + 0x16c))(piVar8), cVar4 != '\0' &&
(piVar10 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"infected_decapitated",0,0),
piVar10 != (int *)0x0)))) {
pcVar2 = *(code **)(*piVar10 + 0x30);
uVar7 = (**(code **)(*engine + 0x40))(engine,piVar8[0xc]);
(*pcVar2)(piVar10,"userid",uVar7);
pcVar2 = *(code **)(*piVar10 + 0x3c);
uVar7 = (**(code **)(*(int *)local_84 + 0x6c8))(local_84);
(*pcVar2)(piVar10,"weapon",uVar7);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar10,0);
}
iVar13 = IPredictionSystem::g_pPredictionSystems;
this[0x1d88] = (Infected)0x1;
for (; iVar13 != 0; iVar13 = *(int *)(iVar13 + 4)) {
*(int *)(iVar13 + 0x10) = *(int *)(iVar13 + 0x10) + -1;
}
return;
}
}
uVar9 = *(uint *)(param_1 + 0x48);
if ((((uVar9 & 0x40) == 0) ||
(*(float *)(param_1 + 0x3c) * 4.0 < *(float *)(param_1 + 0x40) ||
*(float *)(param_1 + 0x3c) * 4.0 == *(float *)(param_1 + 0x40))) || (iVar13 < 1)) {
fVar19 = *(float *)(z_gib_force_factor._28_4_ + 0x2c);
fVar20 = local_7c * fVar19;
fVar21 = local_78 * fVar19;
fVar19 = fVar19 * local_74;
if (((fVar20 != *(float *)(this + 0x1cdc)) || (fVar21 != *(float *)(this + 0x1ce0))) ||
(fVar19 != *(float *)(this + 0x1ce4))) {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
/* try { // try from 00a0f45a to 00a0f4dd has its CatchHandler @ 00a10154 */
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1cdc) = fVar20;
*(float *)(this + 0x1ce0) = fVar21;
*(float *)(this + 0x1ce4) = fVar19;
uVar9 = *(uint *)(param_1 + 0x48);
}
iVar6 = local_28;
puVar14 = g_pEntityList;
if (((uVar9 & 0x1000000) == 0) || (iVar13 < 1)) {
if ((local_34 & 0x4000000) != 0) {
lVar18 = (longdouble)RandomFloat(0x442f0000,0x447a0000);
fVar20 = local_78;
fVar19 = local_7c;
fVar21 = (float)lVar18 + local_74;
if (((local_7c != *(float *)(this + 0x1cdc)) || (local_78 != *(float *)(this + 0x1ce0))) ||
(fVar21 != *(float *)(this + 0x1ce4))) {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
/* try { // try from 00a0fcab to 00a0fd6d has its CatchHandler @ 00a10154 */
iVar13 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1cdc) = fVar19;
*(float *)(this + 0x1ce4) = fVar21;
*(float *)(this + 0x1ce0) = fVar20;
}
CheckForCustomWoundEffect(this,0x20,-1);
goto switchD_00a0f9b2_caseD_0;
}
if ((local_34 & 0x200000) != 0) {
uVar9 = *(uint *)(param_1 + 0x38);
if ((((((uVar9 != 0xffffffff) &&
(puVar15 = g_pEntityList + (uVar9 & 0xfff) * 0x10, puVar15 != (undefined *)0xfffffffc
)) && (*(uint *)(puVar15 + 8) == uVar9 >> 0xc)) &&
((*(int *)(puVar15 + 4) != 0 &&
(this_01 = (CTerrorMeleeWeapon *)
__dynamic_cast(*(int *)(puVar15 + 4),&CBaseCombatWeapon::typeinfo,
&CTerrorMeleeWeapon::typeinfo,0),
this_01 != (CTerrorMeleeWeapon *)0x0)))) &&
(uVar9 = *(uint *)(param_1 + 0x34), uVar9 != 0xffffffff)) &&
(((puVar14 = puVar14 + (uVar9 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == uVar9 >> 0xc)) &&
(this_00 = *(CBaseEntity **)(puVar14 + 4), this_00 != (CBaseEntity *)0x0)))) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
fVar19 = *(float *)(this_00 + 0x380);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
lVar18 = (longdouble)AngleNormalize(fVar19 - *(float *)(this + 0x380));
iVar13 = CTerrorMeleeWeapon::GetMeleeAnimInfo(this_01);
uVar7 = *(undefined4 *)(iVar13 + 0x10);
iVar13 = CTerrorMeleeWeapon::GetMeleeAnimInfo(this_01);
CheckForMeleeWoundEffect
(this,*(undefined4 *)(param_3 + 0x50),*(undefined4 *)(param_3 + 0x44),local_34,
(float)lVar18 < 90.0 && -90.0 < (float)lVar18,*(undefined4 *)(iVar13 + 0xc),
uVar7);
}
if (10.0 < local_40) {
switch(*(undefined4 *)(param_3 + 0x44)) {
case 1:
CBaseEntity::EmitSound((CBaseEntity *)this,"Melee.HitHead",0.0,(float *)0x0);
break;
case 2:
case 3:
CBaseEntity::EmitSound((CBaseEntity *)this,"Melee.HitBody",0.0,(float *)0x0);
break;
case 4:
case 5:
case 6:
case 7:
CBaseEntity::EmitSound((CBaseEntity *)this,"Melee.HitLimb",0.0,(float *)0x0);
}
}
goto switchD_00a0f9b2_caseD_0;
}
if ((-1 < (int)local_34) &&
((*(int *)(param_3 + 0x44) != 1 ||
((((byte)this[0x1c75] & 8) == 0 &&
(*(int *)(z_head_damage_causes_wounds._28_4_ + 0x30) == 0))))))
goto switchD_00a0f9b2_caseD_0;
/* try { // try from 00a0f9ed to 00a0faf1 has its CatchHandler @ 00a10154 */
pCVar11 = (CAmmoDef *)GetAmmoDef();
iVar12 = CAmmoDef::Index(pCVar11,"AMMO_TYPE_HUNTINGRIFLE");
iVar13 = local_28;
if (iVar6 == iVar12) {
LAB_00a0fdcd:
if (*(int *)(param_3 + 0x50) - 0xfU < 2) {
*(undefined4 *)(param_3 + 0x50) = 0xe;
}
}
else {
pCVar11 = (CAmmoDef *)GetAmmoDef();
iVar6 = CAmmoDef::Index(pCVar11,"AMMO_TYPE_SNIPERRIFLE");
if (iVar13 == iVar6) goto LAB_00a0fdcd;
}
uVar5 = true;
if (local_40 < (float)*(int *)(this + 0x100)) {
uVar5 = (byte)(local_34 >> 0x1e) & 1;
}
iVar13 = *(int *)(param_3 + 0x44);
if ((((byte)this[0x1c74] & 0x10) != 0) && (iVar13 == 1)) {
uVar5 = IsNeutral(this);
iVar13 = *(int *)(param_3 + 0x44);
}
CheckForBulletWoundEffect(this,*(int *)(param_3 + 0x50),iVar13,(bool)uVar5);
goto switchD_00a0f9b2_caseD_0;
}
LAB_00a0f4ab:
iVar6 = rand();
iVar13 = *(int *)(*piVar8 + (iVar6 % iVar13) * 4);
if (-1 < iVar13) {
uVar7 = CBaseEntity::GetGender((CBaseEntity *)this);
iVar6 = GetDamageCutoutInfoArray(uVar7);
if (iVar13 < *(int *)(iVar6 + 0xc)) {
RequestWound(this,iVar13);
}
}
}
else {
fVar19 = *(float *)(z_gib_explosion_force_factor._28_4_ + 0x2c);
fVar20 = local_7c * fVar19;
fVar21 = local_78 * fVar19;
fVar19 = fVar19 * local_74;
if (((fVar20 == *(float *)(this + 0x1cdc)) && (fVar21 == *(float *)(this + 0x1ce0))) &&
(fVar19 == *(float *)(this + 0x1ce4))) {
iVar6 = *(int *)(gpGlobals + 4);
if (s_fatalBlastVictimCount != iVar6) goto LAB_00a0f34b;
LAB_00a0f80c:
if (DAT_010243c8 <= *(int *)(z_fatal_blast_max_ragdolls._28_4_ + 0x30)) goto LAB_00a0f36b;
}
else {
if (this[0x6c] == (Infected)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
iVar6 = gpGlobals;
*(float *)(this + 0x1ce4) = fVar19;
*(float *)(this + 0x1cdc) = fVar20;
*(float *)(this + 0x1ce0) = fVar21;
iVar6 = *(int *)(iVar6 + 4);
if (s_fatalBlastVictimCount == iVar6) goto LAB_00a0f80c;
LAB_00a0f34b:
DAT_010243c8 = 0;
s_fatalBlastVictimCount = iVar6;
if (-1 < *(int *)(z_fatal_blast_max_ragdolls._28_4_ + 0x30)) {
LAB_00a0f36b:
if (((DAT_010243c8 < *(int *)(z_fatal_blast_min_ragdolls._28_4_ + 0x30)) ||
(iVar6 = RandomInt(0,100),
*(int *)(z_fatal_blast_incineration_probability._28_4_ + 0x30) <= iVar6)) &&
(cVar4 = UTIL_IsLowViolence(), cVar4 == '\0')) {
DAT_010243c8 = DAT_010243c8 + 1;
goto LAB_00a0f4ab;
}
}
}
UTIL_Remove((CBaseEntity *)this);
}
switchD_00a0f9b2_caseD_0:
for (iVar13 = IPredictionSystem::g_pPredictionSystems; iVar13 != 0; iVar13 = *(int *)(iVar13 + 4))
{
*(int *)(iVar13 + 0x10) = *(int *)(iVar13 + 0x10) + -1;
}
return;
}
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.