fix ambient heat going to high negative values with high life LIGH, fixes #536

This commit is contained in:
jacob1
2018-03-03 20:58:39 -05:00
parent f9b5c6bb1a
commit 2adae64041

View File

@@ -76,6 +76,9 @@ int Element_LIGH::update(UPDATE_FUNC_ARGS)
sim->hv[y/CELL][x/CELL] += powderful/50;
if (sim->hv[y/CELL][x/CELL] > MAX_TEMP)
sim->hv[y/CELL][x/CELL] = MAX_TEMP;
// If the LIGH was so powerful that it overflowed hv, set to max temp
else if (sim->hv[y/CELL][x/CELL] < 0)
sim->hv[y/CELL][x/CELL] = MAX_TEMP;
}
for (rx=-2; rx<3; rx++)