From 06fb0846f2facd09896632466a8bb15b0f1779f0 Mon Sep 17 00:00:00 2001 From: deltanedas <@deltanedas:kde.org> Date: Fri, 3 Jan 2025 21:19:58 +0000 Subject: [PATCH] make gun executions target the head --- Content.Server/_DV/Execution/ExecutionSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/_DV/Execution/ExecutionSystem.cs b/Content.Server/_DV/Execution/ExecutionSystem.cs index 5de3332494..8d4ba66cbc 100644 --- a/Content.Server/_DV/Execution/ExecutionSystem.cs +++ b/Content.Server/_DV/Execution/ExecutionSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Interaction; using Content.Server.Kitchen.Components; using Content.Server.Weapons.Ranged.Systems; +using Content.Shared._Shitmed.Targeting; using Content.Shared.ActionBlocker; using Content.Shared.Clumsy; using Content.Shared.Damage; @@ -261,7 +262,7 @@ public sealed class ExecutionSystem : EntitySystem throw new ArgumentOutOfRangeException(); } - // Clumsy people have a chance to shoot themselves + // Clumsy people have a chance to shoot themselves (not in the head) if (!component.ClumsyProof && TryComp(attacker, out var clumsy) && _random.Prob(1f/3f)) @@ -276,7 +277,7 @@ public sealed class ExecutionSystem : EntitySystem } // Gun successfully fired, deal damage - _damageableSystem.TryChangeDamage(victim, damage * DamageModifier, true); + _damageableSystem.TryChangeDamage(victim, damage * DamageModifier, true, targetPart: TargetBodyPart.Head); _audioSystem.PlayEntity(component.SoundGunshot, Filter.Pvs(weapon), weapon, false, AudioParams.Default); // Popups