mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Merge pull request #10805 from Citadel-Station-13/i-hate-dueling
guns/ammo/projectiles now properly clean up while being deleted
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
setDir(pick(GLOB.alldirs))
|
||||
update_icon()
|
||||
|
||||
/obj/item/ammo_casing/Destroy()
|
||||
if(BB)
|
||||
QDEL_NULL(BB)
|
||||
return ..()
|
||||
|
||||
/obj/item/ammo_casing/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
if(zoomable)
|
||||
azoom = new (src)
|
||||
|
||||
/obj/item/gun/Destroy()
|
||||
QDEL_NULL(pin)
|
||||
QDEL_NULL(gun_light)
|
||||
QDEL_NULL(bayonet)
|
||||
QDEL_NULL(chambered)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/gun/G = locate(/obj/item/gun) in contents
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
QDEL_LIST(ammo_type)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -643,11 +643,11 @@
|
||||
Bump(original)
|
||||
|
||||
/obj/item/projectile/Destroy()
|
||||
STOP_PROCESSING(SSprojectiles, src)
|
||||
if(hitscan)
|
||||
finalize_hitscan_and_generate_tracers()
|
||||
STOP_PROCESSING(SSprojectiles, src)
|
||||
cleanup_beam_segments()
|
||||
qdel(trajectory)
|
||||
QDEL_NULL(trajectory)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/proc/cleanup_beam_segments()
|
||||
|
||||
Reference in New Issue
Block a user