From b280f194c838d93d4d0a126b2b70b9d463e13822 Mon Sep 17 00:00:00 2001 From: NotRanged Date: Wed, 27 Jan 2021 01:33:29 +0100 Subject: [PATCH] Fix hallucination going negative and lasting forever (#56422) If `var/hallucination` was ever set to below 0, it would cause the hallucination effects to never clear. Changes how hallucination is decremented in carbons to avoid this from happening. Co-authored-by: Ranged --- code/modules/flufftext/Hallucination.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 03fee5c8c07..6b6593dce06 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -29,7 +29,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( if(!hallucination) return - hallucination-- + hallucination = max(hallucination - 1, 0) if(world.time < next_hallucination) return