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 <nickvanderkroon@gmail.com>
This commit is contained in:
NotRanged
2021-01-27 00:33:29 +00:00
committed by GitHub
co-authored by Ranged
parent 85cdd7b459
commit b280f194c8
+1 -1
View File
@@ -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