From a8c33779878d4c3993db69fc2c8a98a525ae1377 Mon Sep 17 00:00:00 2001 From: "mport2004@gmail.com" Date: Fri, 4 Feb 2011 06:24:37 +0000 Subject: [PATCH] The AI spawn issue should be fixed now, seems we ran into an issue with the GC. You can also toggle newmob delin using the config file git-svn-id: http://tgstation13.googlecode.com/svn/trunk@957 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/configuration.dm | 4 ++++ code/modules/mob/new_player/new_player.dm | 2 ++ code/modules/mob/transform_procs.dm | 5 +++++ config/config.txt | 3 +++ 4 files changed, 14 insertions(+) diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index ecaaccc19ca..979bbffafc3 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -22,6 +22,7 @@ var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi) var/vote_no_dead = 0 // dead people can't vote (tbi) var/enable_authentication = 0 // goon authentication + var/del_new_on_log = 1 // del's new players if they log before they spawn in var/list/mode_names = list() var/list/modes = list() // allowed modes @@ -169,6 +170,9 @@ if ("guest_jobban") config.guest_jobban = text2num(value) + if ("dont_del_newmob") + config.del_new_on_log = 0 + if ("probability") var/prob_pos = findtext(value, " ") var/prob_name = null diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 60e974c5b6a..7309c2d1b72 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -81,6 +81,8 @@ mob/new_player Logout() ready = 0 ..() + if(!config.del_new_on_log) + return if(!spawning) del(src) return diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 2dd2c0e9d92..29ae55b9274 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -41,6 +41,11 @@ del(src) return +/mob/new_player/AIize() + src.spawning = 1 + ..() + return + /mob/living/carbon/AIize() if (src.monkeyizing) return diff --git a/config/config.txt b/config/config.txt index 310b444a12c..8dabbad63e2 100644 --- a/config/config.txt +++ b/config/config.txt @@ -65,6 +65,9 @@ ALLOW_AI # disable abandon mob NORESPAWN +#disables calling del(src) on newmobs if they logout before spawnin in +#DONT_DEL_NEWMOB + # set a hosted by name for unix platforms HOSTEDBY Yournamehere