diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 2fee0fbc86a..6025aebd33f 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -151,21 +151,23 @@ proc/isorgan(A) return zone -/proc/ran_zone(zone, probability) +/proc/ran_zone(zone, probability = 80) + zone = check_zone(zone) - if(!probability) probability = 90 - if(probability == 100) return zone - if(zone == "chest") - if(prob(probability)) return "chest" - var/t = rand(1, 9) - switch(t) - if(1 to 3) return "head" - if(4 to 6) return "l_arm" - if(7 to 9) return "r_arm" + if(prob(probability)) + return zone - if(prob(probability * 0.75)) return zone - return "chest" + var/t = rand(1, 17) // randomly pick a different zone, or maybe the same one + switch(t) + if(1) return "head" + if(2) return "chest" + if(3 to 6) return "l_arm" + if(7 to 10) return "r_arm" + if(10 to 13) return "l_leg" + if(14 to 17) return "r_leg" + + return zone /proc/stars(n, pr) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index c149e8abe33..6b2eb98b454 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -78,8 +78,8 @@ loc = A.loc return 0// nope.avi - var/distance = get_dist(original,loc) - def_zone = ran_zone(def_zone, 100-(5*distance)) //Lower accurancy/longer range tradeoff. + var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations. + def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use. if(silenced) M << "You've been shot in the [parse_zone(def_zone)] by [src]!" else