Prevent ROCK from repeatedly breaking into STNE and reforming under pressure

This commit is contained in:
catsoften 2021-07-06 21:24:00 -04:00 committed by jacob1
parent 8a788fac78
commit c6a52d1425

View File

@ -131,7 +131,7 @@ int Element_FIRE_update(UPDATE_FUNC_ARGS)
}
}
}
else if ((parts[i].ctype == PT_STNE || !parts[i].ctype) && sim->pv[y / CELL][x / CELL] >= 30.0f) // Form ROCK with pressure
else if ((parts[i].ctype == PT_STNE || !parts[i].ctype) && sim->pv[y / CELL][x / CELL] >= 30.0f && (parts[i].temp > 1943.15f || sim->pv[y / CELL][x / CELL] < 120.0f)) // Form ROCK with pressure, if it will stay molten or not immediately break
{
parts[i].tmp2 = RNG::Ref().between(0, 10); // Provide tmp2 for color noise
parts[i].ctype = PT_ROCK;