From 0214fcb5aedd6f4ebd485388c1fe1cfd63eb82a0 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 13 Jul 2013 14:17:21 -0400 Subject: [PATCH] particles can't be drawn with the brush inside of walls they don't belong, fix flood fill delete issue --- src/simulation/Simulation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c26d17c75..816591a26 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)