diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index 61e00fe41d2..d859a623910 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -42,8 +42,7 @@ return switch(controller) if("Master") - new/datum/controller/master() - Master.process() + Recreate_MC() feedback_add_details("admin_verb","RMC") if("Failsafe") new /datum/controller/failsafe() diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm index 2e4ca6998fd..be4477df1b9 100644 --- a/code/controllers/failsafe.dm +++ b/code/controllers/failsafe.dm @@ -20,6 +20,7 @@ var/datum/controller/failsafe/Failsafe // Track the MC iteration to make sure its still on track. var/master_iteration = 0 + var/running = TRUE /datum/controller/failsafe/New() // Highlander-style: there can only be one! Kill off the old and replace it with the new. @@ -32,14 +33,16 @@ var/datum/controller/failsafe/Failsafe /datum/controller/failsafe/Initialize() set waitfor = 0 Failsafe.Loop() - qdel(Failsafe) //when Loop() returns, we delete ourselves and let the mc recreate us + if(!QDELETED(src)) + qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us /datum/controller/failsafe/Destroy() + running = FALSE ..() return QDEL_HINT_HARDDEL_NOW /datum/controller/failsafe/proc/Loop() - while(1) + while(running) lasttick = world.time if(!Master) // Replace the missing Master! This should never, ever happen.