From d87e21c9d48896230489f5ad74b5fc844fb351e8 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 25 Apr 2014 20:45:42 -0400 Subject: [PATCH] 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. --- src/simulation/Simulation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c3d97aa22..7d9c7c0bf 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -4532,6 +4532,8 @@ killed: 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