From 667a7735534f679aecbf03d59f74386f3c509240 Mon Sep 17 00:00:00 2001 From: MrPerson Date: Tue, 25 Mar 2014 08:44:40 -0700 Subject: [PATCH] Make most mobs del() instead of trying to GC them. Don't try to Destroy() objects that get del(). It was causing infinite loops and other problems. It's now ok to have something call del(src) as part of Destroy(). --- code/game/atoms.dm | 6 ----- code/game/atoms_movable.dm | 4 +-- code/modules/mob/camera/camera.dm | 6 ++++- code/modules/mob/living/living.dm | 5 ++-- tgstation.dme | 42 ------------------------------- 5 files changed, 10 insertions(+), 53 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 7b8854eb22a..8df6edcb713 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -44,12 +44,6 @@ /atom/proc/CheckParts() return -/atom/Del() - // Pass to Destroy(). - if(isnull(gc_destroyed)) // If we're just straight up calling del(atom), make sure anything in Destroy() gets called anyways just to be sure. - Destroy() - ..() - // Like Del(), but for qdel. // Called BEFORE qdel moves shit. // Also called on del() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 02c1879151b..0c06a351d6c 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -23,9 +23,9 @@ return /atom/movable/Del() - if(!gc_destroyed && loc) + if(isnull(gc_destroyed) && loc) testing("GC: -- [type] was deleted via del() rather than qdel() --") -// else if(!gc_destroyed) +// else if(isnull(gc_destroyed)) // testing("GC: [type] was deleted via GC without qdel()") //Not really a huge issue but from now on, please qdel() // else // testing("GC: [type] was deleted via GC with qdel()") diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index ae68c995671..8116544117e 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -12,4 +12,8 @@ move_on_shuttle = 0 /mob/camera/experience_pressure_difference() - return \ No newline at end of file + return + +/mob/camera/Destroy() + ..() + del(src) \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c1b235d5efb..f46e52a0aa5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -5,9 +5,10 @@ cur_area.mob_activate(src) /mob/living/Destroy() - if(mind) - mind.current = null +// if(mind) +// mind.current = null ..() + del(src) /mob/living/verb/succumb(var/whispered as null) set hidden = 1 diff --git a/tgstation.dme b/tgstation.dme index bb19c9d099b..9b4686ef59c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6,48 +6,6 @@ // BEGIN_FILE_DIR #define FILE_DIR . -#define FILE_DIR "html" -#define FILE_DIR "icons" -#define FILE_DIR "icons/ass" -#define FILE_DIR "icons/effects" -#define FILE_DIR "icons/mecha" -#define FILE_DIR "icons/misc" -#define FILE_DIR "icons/mob" -#define FILE_DIR "icons/obj" -#define FILE_DIR "icons/obj/assemblies" -#define FILE_DIR "icons/obj/atmospherics" -#define FILE_DIR "icons/obj/clothing" -#define FILE_DIR "icons/obj/doors" -#define FILE_DIR "icons/obj/flora" -#define FILE_DIR "icons/obj/machines" -#define FILE_DIR "icons/obj/pipes" -#define FILE_DIR "icons/obj/power_cond" -#define FILE_DIR "icons/pda_icons" -#define FILE_DIR "icons/spideros_icons" -#define FILE_DIR "icons/stamp_icons" -#define FILE_DIR "icons/Testing" -#define FILE_DIR "icons/turf" -#define FILE_DIR "icons/vending_icons" -#define FILE_DIR "nano" -#define FILE_DIR "nano/images" -#define FILE_DIR "sound" -#define FILE_DIR "sound/AI" -#define FILE_DIR "sound/ambience" -#define FILE_DIR "sound/effects" -#define FILE_DIR "sound/hallucinations" -#define FILE_DIR "sound/items" -#define FILE_DIR "sound/machines" -#define FILE_DIR "sound/mecha" -#define FILE_DIR "sound/misc" -#define FILE_DIR "sound/piano" -#define FILE_DIR "sound/violin" -#define FILE_DIR "sound/voice" -#define FILE_DIR "sound/voice/complionator" -#define FILE_DIR "sound/vox_fem" -#define FILE_DIR "sound/weapons" -#define FILE_DIR "tools" -#define FILE_DIR "tools/AddToChangelog" -#define FILE_DIR "tools/AddToChangelog/AddToChangelog" // END_FILE_DIR // BEGIN_PREFERENCES