Fix LITH breaking temperature limits.

This commit is contained in:
Saveliy Skresanov
2025-01-23 19:50:46 +07:00
parent 3da994c3b8
commit 79f2bbcae5

View File

@@ -233,12 +233,12 @@ static int update(UPDATE_FUNC_ARGS)
sim->part_change_type(i, x, y, PT_LAVA); sim->part_change_type(i, x, y, PT_LAVA);
if (carbonationFactor < 3) 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; self.ctype = PT_LITH;
} }
else else
{ {
self.temp = 2000.f + storedEnergy * 10; self.temp = restrict_flt(2000.f + storedEnergy * 10, MIN_TEMP, MAX_TEMP);
self.ctype = PT_GLAS; self.ctype = PT_GLAS;
} }
} }