mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +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))
|
setDir(pick(GLOB.alldirs))
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/Destroy()
|
||||||
|
if(BB)
|
||||||
|
QDEL_NULL(BB)
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/ammo_casing/update_icon()
|
/obj/item/ammo_casing/update_icon()
|
||||||
..()
|
..()
|
||||||
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
||||||
|
|||||||
@@ -76,6 +76,13 @@
|
|||||||
if(zoomable)
|
if(zoomable)
|
||||||
azoom = new (src)
|
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)
|
/obj/item/gun/CheckParts(list/parts_list)
|
||||||
..()
|
..()
|
||||||
var/obj/item/gun/G = locate(/obj/item/gun) in contents
|
var/obj/item/gun/G = locate(/obj/item/gun) in contents
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
/obj/item/gun/energy/Destroy()
|
/obj/item/gun/energy/Destroy()
|
||||||
QDEL_NULL(cell)
|
QDEL_NULL(cell)
|
||||||
|
QDEL_LIST(ammo_type)
|
||||||
STOP_PROCESSING(SSobj, src)
|
STOP_PROCESSING(SSobj, src)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -643,11 +643,11 @@
|
|||||||
Bump(original)
|
Bump(original)
|
||||||
|
|
||||||
/obj/item/projectile/Destroy()
|
/obj/item/projectile/Destroy()
|
||||||
|
STOP_PROCESSING(SSprojectiles, src)
|
||||||
if(hitscan)
|
if(hitscan)
|
||||||
finalize_hitscan_and_generate_tracers()
|
finalize_hitscan_and_generate_tracers()
|
||||||
STOP_PROCESSING(SSprojectiles, src)
|
|
||||||
cleanup_beam_segments()
|
cleanup_beam_segments()
|
||||||
qdel(trajectory)
|
QDEL_NULL(trajectory)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/projectile/proc/cleanup_beam_segments()
|
/obj/item/projectile/proc/cleanup_beam_segments()
|
||||||
|
|||||||
Reference in New Issue
Block a user