fix newtonian gravity state transitions flashing

This commit is contained in:
jacob1 2017-08-05 17:53:41 -04:00
parent fd91fa4438
commit 6fca44fd70

View File

@ -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;