summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-13 18:17:21 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-13 18:17:21 (GMT)
commit0214fcb5aedd6f4ebd485388c1fe1cfd63eb82a0 (patch)
tree2b3bd9a86efe5a1daba71c61922ba4e182fab952 /src/simulation/Simulation.cpp
parent01b2d552633fb848e7fb2201935b11a567325a41 (diff)
downloadpowder-0214fcb5aedd6f4ebd485388c1fe1cfd63eb82a0.zip
powder-0214fcb5aedd6f4ebd485388c1fe1cfd63eb82a0.tar.gz
particles can't be drawn with the brush inside of walls they don't belong, fix flood fill delete issue
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index c26d17c..816591a 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -1445,7 +1445,7 @@ int Simulation::FloodParts(int x, int y, int fullc, int cm, int flags)
else
cm = 0;
}
- if (IsWallBlocking(x, y, c))
+ if (c != 0 && IsWallBlocking(x, y, c))
return 1;
if (!FloodFillPmapCheck(x, y, cm))
@@ -2736,6 +2736,8 @@ int Simulation::create_part(int p, int x, int y, int tv)
}
return -1;
}
+ else if (IsWallBlocking(x, y, t))
+ return -1;
if (photons[y][x] && (elements[t].Properties & TYPE_ENERGY))
return -1;
if (pfree == -1)