Permalink
Browse files

fix bug where liquids don't stabalize in radial gravity

nx and ny are declared at the start of update_particles_i, but not reinitialized before the liquid attempts to move, so it will always try to move up and left first, and probably succeed.
  • Loading branch information...
jacob1 committed Apr 26, 2014
1 parent 49996a8 commit d87e21c9d48896230489f5ad74b5fc844fb351e8
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/simulation/Simulation.cpp
@@ -4532,6 +4532,8 @@ void Simulation::update_particles_i(int start, int inc)
rt = 10;
nxf = clear_xf;
nyf = clear_yf;
nx = (int)(parts[i].x+0.5f);
ny = (int)(parts[i].y+0.5f);
for (j=0;j<rt;j++)
{
switch (gravityMode)

0 comments on commit d87e21c

Please sign in to comment.