From 8a66f3147b2b6aa11117dfd612db60d9764aecf4 Mon Sep 17 00:00:00 2001 From: AnturK Date: Mon, 31 Oct 2016 20:37:08 +0100 Subject: [PATCH] Fixes two more runtimes (#21278) * I don't know what this equation is supposed to do, but byond does not support imaginary numbers out of the box * Sanity check for bombs * Assume 0 value if negative. * There is no revert commit button on github. --- code/datums/diseases/advance/symptoms/fever.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index 15aadb73294..b018e8f34e3 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -36,6 +36,6 @@ Bonus return /datum/symptom/fever/proc/Heat(mob/living/M, datum/disease/advance/A) - var/get_heat = (sqrt(21+A.totalTransmittable()*2))+(sqrt(20+A.totalStageSpeed()*3)) + var/get_heat = (sqrt(max(21,21+A.totalTransmittable()*2)))+(sqrt(max(21,20+A.totalStageSpeed()*3))) M.bodytemperature = min(M.bodytemperature + (get_heat * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1) - return 1 \ No newline at end of file + return 1