mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fixes projectiles still applying effects even if they missed.
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
if(!def_zone)
|
if(!def_zone)
|
||||||
visible_message("\blue \The [src] misses [M] narrowly!")
|
visible_message("\blue \The [src] misses [M] narrowly!")
|
||||||
forcedodge = 1
|
forcedodge = -1
|
||||||
else
|
else
|
||||||
if(silenced)
|
if(silenced)
|
||||||
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
||||||
@@ -99,8 +99,9 @@
|
|||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
if(A)
|
if(A)
|
||||||
var/permutation = A.bullet_act(src, def_zone) // searches for return value
|
if (!forcedodge)
|
||||||
if(permutation == -1 || forcedodge) // the bullet passes through a dense object!
|
forcedodge = A.bullet_act(src, def_zone) // searches for return value
|
||||||
|
if(forcedodge == -1) // the bullet passes through a dense object!
|
||||||
bumped = 0 // reset bumped variable!
|
bumped = 0 // reset bumped variable!
|
||||||
if(istype(A, /turf))
|
if(istype(A, /turf))
|
||||||
loc = A
|
loc = A
|
||||||
@@ -114,7 +115,6 @@
|
|||||||
O.bullet_act(src)
|
O.bullet_act(src)
|
||||||
for(var/mob/M in A)
|
for(var/mob/M in A)
|
||||||
M.bullet_act(src, def_zone)
|
M.bullet_act(src, def_zone)
|
||||||
|
|
||||||
density = 0
|
density = 0
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user