Fixes a bug where the tensioner spawning players would fail in less than ideal conditions.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3303 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-03-15 22:31:23 +00:00
parent d0308b3f64
commit cd0428f4bb
2 changed files with 25 additions and 4 deletions
+19 -3
View File
@@ -356,8 +356,13 @@ var/global/datum/tension/tension_master
spawn(300)
if(candidates.len)
theghost = pick(candidates)
while(!theghost && candidates.len)
theghost = pick(candidates)
candidates.Remove(theghost)
if(!theghost)
return 0
var/mob/living/carbon/human/new_character=makeBody(theghost)
del(theghost)
new_character.mind.make_Wizard()
@@ -420,8 +425,13 @@ var/global/datum/tension/tension_master
syndicate_begin()
for(var/i = 0, i<numagents,i++)
theghost = pick(candidates)
while(!theghost && candidates.len)
theghost = pick(candidates)
candidates.Remove(theghost)
if(!theghost)
break
var/mob/living/carbon/human/new_character=makeBody(theghost)
del(theghost)
new_character.mind.make_Nuke()
@@ -524,8 +534,14 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
if(candidates.len)
while(!theghost && candidates.len)
theghost = pick(candidates)
candidates.Remove(theghost)
if(!theghost)
del(new_syndicate_commando)
break
new_syndicate_commando.mind.key = theghost.key//For mind stuff.
new_syndicate_commando.key = theghost.key
new_syndicate_commando.internal = new_syndicate_commando.s_store