Merge pull request #10916 from Citadel-Station-13/kevinz000-patch-6

Projectiles now always hit chest if targeting chest, snipers now have 100% targeting zone accuracy
This commit is contained in:
Ghom
2020-02-14 19:20:32 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -90,6 +90,10 @@
var/decayedRange //stores original range
var/reflect_range_decrease = 5 //amount of original range that falls off when reflecting, so it doesn't go forever
var/is_reflectable = FALSE // Can it be reflected or not?
/// factor to multiply by for zone accuracy percent.
var/zone_accuracy_factor = 1
//Effects
var/stun = 0
var/knockdown = 0
@@ -249,7 +253,8 @@
return TRUE
var/distance = get_dist(T, 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(check_zone(def_zone) != BODY_ZONE_CHEST)
def_zone = ran_zone(def_zone, max(100-(7*distance), 5) * zone_accuracy_factor) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(isturf(A) && hitsound_wall)
var/volume = CLAMP(vol_by_damage() + 20, 0, 100)

View File

@@ -7,6 +7,7 @@
knockdown = 100
dismemberment = 50
armour_penetration = 50
zone_accuracy_factor = 100 //guarunteed 100%
var/breakthings = TRUE
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)