Skip to content

Commit

Permalink
Flatter surface when liquids solidify
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonmj committed Nov 6, 2014
1 parent 43bab35 commit 829e2cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/simulation/Simulation.cpp
Expand Up @@ -3294,6 +3294,7 @@ void Simulation::update_particles_i(int start, int inc)
unsigned int elem_properties;
float pGravX, pGravY, pGravD;
int excessive_stacking_found = 0;
bool transitionOccurred;

currentTick++;

Expand Down Expand Up @@ -3840,6 +3841,8 @@ void Simulation::update_particles_i(int start, int inc)
}
#endif

transitionOccurred = false;

ctemph = ctempl = pt;
// 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)
Expand Down Expand Up @@ -4064,6 +4067,7 @@ void Simulation::update_particles_i(int start, int inc)
kill_part(i);
goto killed;
}
transitionOccurred = true;
}

pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP);
Expand Down Expand Up @@ -4188,6 +4192,7 @@ void Simulation::update_particles_i(int start, int inc)
kill_part(i);
goto killed;
}
transitionOccurred = true;
}

//call the particle update function, if there is one
Expand Down Expand Up @@ -4224,6 +4229,9 @@ void Simulation::update_particles_i(int start, int inc)
if (parts[i].type == PT_NONE)//if its dead, skip to next particle
continue;

if (transitionOccurred)
continue;

if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next
continue;

Expand Down

0 comments on commit 829e2cc

Please sign in to comment.