Reversions and fixes (#7889)

Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
Raeschen
2024-03-06 18:20:29 +01:00
committed by GitHub
parent c277710a50
commit e29b9d4d35
37 changed files with 254 additions and 203 deletions

View File

@@ -23,6 +23,10 @@
BB = new projectile_type(src)
randpixel_xy()
/obj/item/ammo_casing/Destroy()
QDEL_NULL(BB)
return ..()
//removes the projectile from the ammo casing
/obj/item/ammo_casing/proc/expend()
. = BB

View File

@@ -469,15 +469,13 @@
impacted_mobs.Cut()
impacted_mobs = null
trajectory = null
beam_index = null
beam_components = null
qdel(trajectory)
cleanup_beam_segments()
if(my_case)
if(my_case.BB == src)
my_case.BB = null
my_case = null
my_case = null
return ..()
@@ -743,6 +741,12 @@
/obj/item/projectile/proc/launch_projectile(atom/target, target_zone, mob/user, params, angle_override, forced_spread = 0)
if(!get_turf(user) && !get_turf(src)) // if both the user of the projectile AND the projectile itself are in nullspace, don't fire, just remove ourselves
spawn(1)
qdel(src)
return //fire returns nothing, so neither do we need to
original = target
def_zone = check_zone(target_zone)
firer = user