-Added a check to see if you're on turf before trying to spread a disease to someone.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5023 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-11-07 08:37:46 +00:00
parent dad93575c5
commit 5868952ce0
2 changed files with 6 additions and 4 deletions

View File

@@ -120,9 +120,11 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(how_spread != AIRBORNE && how_spread != SPECIAL)
check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it
for(var/mob/living/carbon/M in oview(check_range, source))
if(AStar(affected_mob.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
M.contract_disease(src)
if(isturf(affected_mob.loc))
for(var/mob/living/carbon/M in oview(check_range, source))
if(isturf(M.loc))
if(AStar(affected_mob.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
M.contract_disease(src)
return

View File

@@ -291,7 +291,7 @@ var/list/archive_diseases = list()
symptoms += S
return
// Simply removes the symptom and refreshes.
// Simply removes the symptom.
/datum/disease/advance/proc/RemoveSymptom(var/datum/symptom/S)
symptoms -= S
return