Flatter surface when liquids solidify

This commit is contained in:
jacksonmj
2014-11-06 00:30:35 +00:00
parent 43bab359db
commit 829e2cca7d

View File

@@ -3294,6 +3294,7 @@ void Simulation::update_particles_i(int start, int inc)
unsigned int elem_properties; unsigned int elem_properties;
float pGravX, pGravY, pGravD; float pGravX, pGravY, pGravD;
int excessive_stacking_found = 0; int excessive_stacking_found = 0;
bool transitionOccurred;
currentTick++; currentTick++;
@@ -3840,6 +3841,8 @@ void Simulation::update_particles_i(int start, int inc)
} }
#endif #endif
transitionOccurred = false;
ctemph = ctempl = pt; ctemph = ctempl = pt;
// change boiling point with pressure // change boiling point with pressure
if ((elements[t].State==ST_LIQUID && elements[t].HighTemperatureTransition>-1 && elements[t].HighTemperatureTransition<PT_NUM && elements[elements[t].HighTemperatureTransition].State==ST_GAS) if ((elements[t].State==ST_LIQUID && elements[t].HighTemperatureTransition>-1 && elements[t].HighTemperatureTransition<PT_NUM && elements[elements[t].HighTemperatureTransition].State==ST_GAS)
@@ -4064,6 +4067,7 @@ void Simulation::update_particles_i(int start, int inc)
kill_part(i); kill_part(i);
goto killed; goto killed;
} }
transitionOccurred = true;
} }
pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP);
@@ -4188,6 +4192,7 @@ void Simulation::update_particles_i(int start, int inc)
kill_part(i); kill_part(i);
goto killed; goto killed;
} }
transitionOccurred = true;
} }
//call the particle update function, if there is one //call the particle update function, if there is one
@@ -4224,6 +4229,9 @@ killed:
if (parts[i].type == PT_NONE)//if its dead, skip to next particle if (parts[i].type == PT_NONE)//if its dead, skip to next particle
continue; continue;
if (transitionOccurred)
continue;
if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next
continue; continue;