mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-02 12:32:40 +02:00
fix ambient heat going to high negative values with high life LIGH, fixes #536
This commit is contained in:
@@ -73,9 +73,12 @@ int Element_LIGH::update(UPDATE_FUNC_ARGS)
|
|||||||
//Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS);
|
//Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS);
|
||||||
if (sim->aheat_enable)
|
if (sim->aheat_enable)
|
||||||
{
|
{
|
||||||
sim->hv[y/CELL][x/CELL]+=powderful/50;
|
sim->hv[y/CELL][x/CELL] += powderful/50;
|
||||||
if (sim->hv[y/CELL][x/CELL]>MAX_TEMP)
|
if (sim->hv[y/CELL][x/CELL] > MAX_TEMP)
|
||||||
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++)
|
for (rx=-2; rx<3; rx++)
|
||||||
|
Reference in New Issue
Block a user