From 57409b0b4113c7e08d2dd392584ead248b774cb5 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sat, 1 Nov 2014 15:38:39 +0000 Subject: [PATCH] Change order in which particles are created by the rectangle and brush tools to make liquid movement look less weird in normal gravity --- src/simulation/Simulation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 99d81f1a4..df090455e 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1248,7 +1248,7 @@ int Simulation::CreateParts(int positionX, int positionY, int c, Brush * cBrush, int radiusX = cBrush->GetRadius().X, radiusY = cBrush->GetRadius().Y, sizeX = cBrush->GetSize().X, sizeY = cBrush->GetSize().Y; unsigned char *bitmap = cBrush->GetBitmap(); - for(int y = 0; y < sizeY; y++) + for(int y = sizeY-1; y >=0; y--) { for(int x = 0; x < sizeX; x++) { @@ -1431,7 +1431,7 @@ void Simulation::CreateBox(int x1, int y1, int x2, int y2, int c, int flags) y2 = y1; y1 = j; } - for (j=y1; j<=y2; j++) + for (j=y2; j>=y1; j--) for (i=x1; i<=x2; i++) CreateParts(i, j, 0, 0, c, flags); }