Skip to content

Commit

Permalink
fix newtonian gravity state transitions flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Aug 5, 2017
1 parent fd91fa4 commit 6fca44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -4107,7 +4107,7 @@ void Simulation::UpdateParticles(int start, int end)
else s = 0;
}
else s = 0;
} else if (elements[t].LowPressureTransition>-1 && pv[y/CELL][x/CELL]<elements[t].LowPressure) {
} else if (elements[t].LowPressureTransition>-1 && pv[y/CELL][x/CELL]<elements[t].LowPressure && gravtot<(elements[t].LowPressure/4.0f)) {
// particle type change due to low pressure
if (elements[t].LowPressureTransition!=PT_NUM)
t = elements[t].LowPressureTransition;
Expand Down

0 comments on commit 6fca44f

Please sign in to comment.