race conditions and turfs beings special.

This commit is contained in:
Ghommie
2020-02-06 01:13:28 +01:00
parent ab06c23a2b
commit 233ed5873f
3 changed files with 8 additions and 6 deletions

View File

@@ -82,8 +82,9 @@
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
imp_in?.gib(TRUE)
qdel(src)
if(!QDELETED(imp_in))
imp_in.gib(TRUE)
qdel(src)
/obj/item/implant/explosive/macro
name = "macrobomb implant"

View File

@@ -171,7 +171,7 @@
var/turf/T = user.loc //get user's location for delay checks
//the istype cascade has been spread among various procs for easy overriding
if(try_clean(W, user, T) || try_wallmount(W, user, T) || try_decon(W, user, T) || try_destroy(W, user, T))
if(try_clean(W, user, T) || try_wallmount(W, user, T) || try_decon(W, user, T) || (iswall(src) && try_destroy(W, user, T)))
return
return ..()

View File

@@ -57,9 +57,10 @@
fire_delay = shot.delay
/obj/item/gun/energy/Destroy()
QDEL_NULL(cell)
QDEL_LIST(ammo_type)
STOP_PROCESSING(SSobj, src)
if(flags_1 & INITIALIZED_1)
QDEL_NULL(cell)
QDEL_LIST(ammo_type)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/process()