mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Fixes #8564
This commit is contained in:
@@ -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.
|
//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)
|
/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
|
//accuracy bonus from aiming
|
||||||
if (istype(shot_from, /obj/item/weapon/gun))
|
if (istype(shot_from, /obj/item/weapon/gun))
|
||||||
var/obj/item/weapon/gun/daddy = shot_from
|
var/obj/item/weapon/gun/daddy = shot_from
|
||||||
miss_modifier -= round(15*daddy.accuracy)
|
miss_modifier -= round(15*daddy.accuracy)
|
||||||
|
|
||||||
//If you aim at someone beforehead, it'll hit more often.
|
//If you aim at someone beforehead, it'll hit more often.
|
||||||
//Kinda balanced by fact you need like 2 seconds to aim
|
//Kinda balanced by fact you need like 2 seconds to aim
|
||||||
//As opposed to no-delay pew pew
|
//As opposed to no-delay pew pew
|
||||||
@@ -184,7 +186,7 @@
|
|||||||
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area, forced=0)
|
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area, forced=0)
|
||||||
if(A == src)
|
if(A == src)
|
||||||
return 0 //no
|
return 0 //no
|
||||||
|
|
||||||
if(A == firer)
|
if(A == firer)
|
||||||
loc = A.loc
|
loc = A.loc
|
||||||
return 0 //cannot shoot yourself
|
return 0 //cannot shoot yourself
|
||||||
@@ -205,7 +207,7 @@
|
|||||||
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
|
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
|
||||||
if(Bump(G.affecting, forced=1))
|
if(Bump(G.affecting, forced=1))
|
||||||
return //If Bump() returns 0 (keep going) then we continue on to attack M.
|
return //If Bump() returns 0 (keep going) then we continue on to attack M.
|
||||||
|
|
||||||
passthrough = !attack_mob(M, distance)
|
passthrough = !attack_mob(M, distance)
|
||||||
else
|
else
|
||||||
passthrough = 1 //so ghosts don't stop bullets
|
passthrough = 1 //so ghosts don't stop bullets
|
||||||
@@ -237,7 +239,7 @@
|
|||||||
|
|
||||||
//stop flying
|
//stop flying
|
||||||
on_impact(A)
|
on_impact(A)
|
||||||
|
|
||||||
density = 0
|
density = 0
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
del(src)
|
del(src)
|
||||||
@@ -268,8 +270,8 @@
|
|||||||
if(!(original in permutated))
|
if(!(original in permutated))
|
||||||
Bump(original)
|
Bump(original)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
//"Tracing" projectile
|
//"Tracing" projectile
|
||||||
/obj/item/projectile/test //Used to see if you can hit them.
|
/obj/item/projectile/test //Used to see if you can hit them.
|
||||||
invisibility = 101 //Nope! Can't see me!
|
invisibility = 101 //Nope! Can't see me!
|
||||||
yo = null
|
yo = null
|
||||||
|
|||||||
Reference in New Issue
Block a user