Fix penetrator projectiles (#28434)

* thats all i can do

* ricochet makes you a target again

* fullfix????!?
This commit is contained in:
kyunkyunkyun
2025-02-26 09:43:05 +00:00
committed by GitHub
parent 9574428df0
commit 6ded7786fd
+3 -2
View File
@@ -276,6 +276,7 @@
ricochets++
if(A.handle_ricochet(src))
on_ricochet(A)
permutated.Cut()
ignore_source_check = TRUE
range = initial(range)
return TRUE
@@ -306,7 +307,7 @@
prehit(A)
var/pre_permutation = A.atom_prehit(src)
var/permutation = -1
if(pre_permutation != ATOM_PREHIT_FAILURE)
if(pre_permutation != ATOM_PREHIT_FAILURE && !(A in permutated))
permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null
if(permutation == -1 || forcedodge)// the bullet passes through a dense object!
if(forcedodge)
@@ -438,7 +439,7 @@
/// A mob moving on a tile with a projectile is hit by it.
/obj/item/projectile/proc/on_atom_entered(datum/source, atom/movable/entered)
if(isliving(entered) && entered.density && !checkpass(PASSMOB))
if(isliving(entered) && entered.density && !checkpass(PASSMOB) && !(entered in permutated) && (entered.loc == loc))
Bump(entered, 1)
/obj/item/projectile/Destroy()