mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-24 00:43:00 +02:00
Fix particles displaced by liquids moving to overlapping positions
This commit is contained in:
committed by
Simon Robertshaw
parent
a64c202834
commit
3011367eb0
@@ -1990,7 +1990,9 @@ killed:
|
|||||||
if (try_move(i, x, y, j, clear_y))
|
if (try_move(i, x, y, j, clear_y))
|
||||||
{
|
{
|
||||||
parts[i].x = clear_xf+(j-clear_x);
|
parts[i].x = clear_xf+(j-clear_x);
|
||||||
|
parts[i].y = clear_yf;
|
||||||
nx = j;
|
nx = j;
|
||||||
|
ny = clear_y;
|
||||||
s = 1;
|
s = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2002,11 +2004,11 @@ killed:
|
|||||||
else
|
else
|
||||||
r = -1;
|
r = -1;
|
||||||
if (s)
|
if (s)
|
||||||
for (j=clear_y+r; j>=0 && j<YRES && j>=clear_y-rt && j<clear_y+rt; j+=r)
|
for (j=ny+r; j>=0 && j<YRES && j>=ny-rt && j<ny+rt; j+=r)
|
||||||
{
|
{
|
||||||
if (try_move(i, x, y, nx, j))
|
if (try_move(i, nx, ny, nx, j))
|
||||||
{
|
{
|
||||||
parts[i].y = clear_yf+(j-clear_y);
|
parts[i].y += j-ny;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((pmap[j][nx]&255)!=t || (bmap[j/CELL][nx/CELL] && bmap[j/CELL][nx/CELL]!=WL_STREAM))
|
if ((pmap[j][nx]&255)!=t || (bmap[j/CELL][nx/CELL] && bmap[j/CELL][nx/CELL]!=WL_STREAM))
|
||||||
|
Reference in New Issue
Block a user