This commit is contained in:
Chinsky
2015-03-30 22:04:13 +03:00
parent e3ad4dc013
commit 40cf940f13

View File

@@ -136,11 +136,13 @@
//Called when the projectile intercepts a mob. Returns 1 if the projectile hit the mob, 0 if it missed and should keep flying.
/obj/item/projectile/proc/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier=0)
if(istype(target_mob)
return
//accuracy bonus from aiming
if (istype(shot_from, /obj/item/weapon/gun))
var/obj/item/weapon/gun/daddy = shot_from
miss_modifier -= round(15*daddy.accuracy)
//If you aim at someone beforehead, it'll hit more often.
//Kinda balanced by fact you need like 2 seconds to aim
//As opposed to no-delay pew pew
@@ -184,7 +186,7 @@
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area, forced=0)
if(A == src)
return 0 //no
if(A == firer)
loc = A.loc
return 0 //cannot shoot yourself
@@ -205,7 +207,7 @@
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
if(Bump(G.affecting, forced=1))
return //If Bump() returns 0 (keep going) then we continue on to attack M.
passthrough = !attack_mob(M, distance)
else
passthrough = 1 //so ghosts don't stop bullets
@@ -237,7 +239,7 @@
//stop flying
on_impact(A)
density = 0
invisibility = 101
del(src)
@@ -268,8 +270,8 @@
if(!(original in permutated))
Bump(original)
sleep(1)
//"Tracing" projectile
//"Tracing" projectile
/obj/item/projectile/test //Used to see if you can hit them.
invisibility = 101 //Nope! Can't see me!
yo = null