Adds sanity check to Narsie pickcultist proc (#31937)

* Adds sanity check to Narsie pickcultist proc

* claned up src

* cleaned
This commit is contained in:
ShizCalev
2017-10-21 19:52:03 -04:00
committed by CitadelStationBot
parent 3e1c307e4e
commit 0a14bf3fd4

View File

@@ -142,7 +142,7 @@
for(var/mob/living/carbon/food in GLOB.living_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
var/turf/pos = get_turf(food)
if(pos.z != src.z)
if(!pos || (pos.z != z))
continue
if(iscultist(food))
@@ -163,7 +163,7 @@
if(!ghost.client)
continue
var/turf/pos = get_turf(ghost)
if(pos.z != src.z)
if(!pos || (pos.z != z))
continue
cultists += ghost
if(cultists.len)