From 79f2bbcae596fa0a612016cf432e6dafce978587 Mon Sep 17 00:00:00 2001 From: Saveliy Skresanov Date: Thu, 23 Jan 2025 19:50:46 +0700 Subject: [PATCH] Fix LITH breaking temperature limits. --- src/simulation/elements/LITH.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/elements/LITH.cpp b/src/simulation/elements/LITH.cpp index 286381aca..3b433fe19 100644 --- a/src/simulation/elements/LITH.cpp +++ b/src/simulation/elements/LITH.cpp @@ -233,12 +233,12 @@ static int update(UPDATE_FUNC_ARGS) sim->part_change_type(i, x, y, PT_LAVA); if (carbonationFactor < 3) { - self.temp = 500.f + storedEnergy * 10; + self.temp = restrict_flt(500.f + storedEnergy * 10, MIN_TEMP, MAX_TEMP); self.ctype = PT_LITH; } else { - self.temp = 2000.f + storedEnergy * 10; + self.temp = restrict_flt(2000.f + storedEnergy * 10, MIN_TEMP, MAX_TEMP); self.ctype = PT_GLAS; } }