diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index cb8f3480e0e..20a99e8f6f7 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -40,8 +40,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 e2427d3c295..5580c5234b1 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,17 @@ var/datum/controller/failsafe/Failsafe /datum/controller/failsafe/Initialize() set waitfor = 0 Failsafe.Loop() + running = FALSE qdel(Failsafe) //when Loop() returns, we delete ourselves and let the mc recreate us /datum/controller/failsafe/Destroy() - ..() - return QDEL_HINT_HARDDEL_NOW + if(running) + running = FALSE + return QDEL_HINT_LETMELIVE + return ..() /datum/controller/failsafe/proc/Loop() - while(1) + while(running) lasttick = world.time if(!Master) // Replace the missing Master! This should never, ever happen.