[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 (9431c92f70) 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>
This commit is contained in:
SkyratBot
2022-06-02 13:46:09 +01:00
committed by GitHub
co-authored by Ryll Ryll
parent 4360fc1d0e
commit 0134b67a7c
+2 -2
View File
@@ -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