From 059d93c142676ea54d299952b6e95b4df39d269d Mon Sep 17 00:00:00 2001 From: "vageyenaman@gmail.com" Date: Mon, 18 Jul 2011 22:58:45 +0000 Subject: [PATCH] Fixed a very serious runtime error spam that I may have unintentionally caused a while ago. This may or may not actually speed up the server a bit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1887 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/Chemistry-Holder.dm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/code/WorkInProgress/Chemistry-Holder.dm b/code/WorkInProgress/Chemistry-Holder.dm index baf85d31d0f..268abbd94b2 100644 --- a/code/WorkInProgress/Chemistry-Holder.dm +++ b/code/WorkInProgress/Chemistry-Holder.dm @@ -298,14 +298,16 @@ datum my_atom.on_reagent_change() // mix dem viruses - if(R.data && R.data["viruses"] || data &&data["viruses"]) - var/list/this = R.data["viruses"] - var/list/that = data["viruses"] - this += that // combine the two + if(R.data && data) + if(R.data && R.data["viruses"] || data && data["viruses"]) + var/list/this = R.data["viruses"] + var/list/that = data["viruses"] + this += that // combine the two - for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time - for(var/datum/disease/d in this) - d.cure(0) + for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time + for(var/datum/disease/d in this) + if(d != D) + D.cure(0) return 0