From: Calecute <34964590+Calecute@users.noreply.github.com> Date: Sun, 20 Oct 2024 03:41:44 +0000 (-0300) Subject: Blunt damage will do stamina damage on wide attacks (#32422) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=b7bd7c1d68fb54044b45191821d9f80ca5c69c32;p=space-station-14.git Blunt damage will do stamina damage on wide attacks (#32422) Fix: blunt damage will now do stamina damage on wide attacks. --- diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 9b15e5f8a0..767b5c4ef6 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -670,6 +670,12 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem if (damageResult != null && damageResult.GetTotal() > FixedPoint2.Zero) { + // If the target has stamina and is taking blunt damage, they should also take stamina damage based on their blunt to stamina factor + if (damageResult.DamageDict.TryGetValue("Blunt", out var bluntDamage)) + { + _stamina.TakeStaminaDamage(entity, (bluntDamage * component.BluntStaminaDamageFactor).Float(), visual: false, source: user, with: meleeUid == user ? null : meleeUid); + } + appliedDamage += damageResult; if (meleeUid == user)