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.
This commit is contained in:
jacob1 2014-04-25 20:45:42 -04:00
parent 49996a8c02
commit d87e21c9d4

View File

@ -4532,6 +4532,8 @@ killed:
rt = 10; rt = 10;
nxf = clear_xf; nxf = clear_xf;
nyf = clear_yf; nyf = clear_yf;
nx = (int)(parts[i].x+0.5f);
ny = (int)(parts[i].y+0.5f);
for (j=0;j<rt;j++) for (j=0;j<rt;j++)
{ {
switch (gravityMode) switch (gravityMode)