improved readibility

This commit is contained in:
Gonenc 2022-12-01 16:15:40 +03:00
parent b393050e55
commit b32cc63245

View File

@ -88,9 +88,10 @@ int Element_FIRE_update(UPDATE_FUNC_ARGS)
}
break;
case PT_LAVA:
float pres = sim->pv[y / CELL][x / CELL];
if (parts[i].ctype == PT_ROCK)
{
float pres = sim->pv[y / CELL][x / CELL];
{
if (pres <= -9)
{
parts[i].ctype = PT_STNE;
@ -131,7 +132,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 && (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
else if ((parts[i].ctype == PT_STNE || !parts[i].ctype) && pres >= 30.0f && (parts[i].temp > sim->elements[PT_ROCK].HighTemperature || pres < sim->elements[PT_ROCK].HighPressure)) // 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;