From 7feceab01ca9dc5b8b9b86dee576a0639a9fc307 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 19 Mar 2019 12:04:35 +0200 Subject: [PATCH] b52f40e...d9e5368 commit d9e5368228a3712c57cdc962b8dd6dcda73b4591 Author: Joonas Rikkonen Date: Tue Mar 19 12:02:52 2019 +0200 StatusEffects only apply non-limb-specific afflictions to one limb even if targeting the whole character. Fixes drugs like fentanyl and morphine being way too harmful due to the oxygen loss affliction being applied once per every limb. Closes #1294 --- .../BarotraumaShared/Source/StatusEffects/StatusEffect.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs b/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs index 55d8c62fe..610ea7ce3 100644 --- a/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs +++ b/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs @@ -696,6 +696,8 @@ namespace Barotrauma foreach (Limb limb in character.AnimController.Limbs) { limb.character.DamageLimb(entity.WorldPosition, limb, new List() { multipliedAffliction }, stun: 0.0f, playSound: false, attackImpulse: 0.0f); + //only apply non-limb-specific afflictions to the first limb + if (!affliction.Prefab.LimbSpecific) { break; } } } else if (target is Limb limb)