From 0134b67a7c9a443e87a0bfa945701045e5c8ea07 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 2 Jun 2022 14:46:09 +0200 Subject: [PATCH] [MIRROR] Fixes pellet cloud wounding where I just broke it [MDB IGNORE] (#14052) * Fixes pellet cloud wounding where I just broke it (#67424) I was stupid in #67331 (9431c92f7095e0f45341bc57f795b0fab32f74cd) and forgot an initial() around an un-instantiated projectile var call. This puts it in so wounding checks don't runtime. I have actually tested that this works Pellet clouds work properly * Fixes pellet cloud wounding where I just broke it Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> --- code/datums/components/pellet_cloud.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index 5c1c63bc092..1906c79335a 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -314,10 +314,10 @@ // technically this only checks armor worn the moment that all the pellets resolve rather than as each one hits you, // but this isn't important enough to warrant all the extra loops of mostly redundant armor checks var/mob/living/carbon/hit_carbon = target - var/armor_factor = hit_carbon.getarmor(hit_part, P.armor_flag) + var/armor_factor = hit_carbon.getarmor(hit_part, initial(P.armor_flag)) armor_factor = min(ARMOR_MAX_BLOCK, armor_factor) //cap damage reduction at 90% if(armor_factor > 0) - if(P.weak_against_armour && armor_factor >= 0) + if(initial(P.weak_against_armour) && armor_factor >= 0) armor_factor *= ARMOR_WEAKENED_MULTIPLIER damage_dealt *= armor_factor