From 9cab6959b699512081a438b1b47c557ee3a8ed18 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 30 Nov 2015 14:20:37 -0500 Subject: [PATCH] fix flood fill delete on normal particles also deleting photons --- src/simulation/Simulation.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9194d442de..ab3c19da75 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1650,7 +1650,23 @@ int Simulation::FloodParts(int x, int y, int fullc, int cm, int flags) // fill span for (x=x1; x<=x2; x++) { - if (CreateParts(x, y, 0, 0, fullc, flags)) + if (!fullc) + { + if (elements[cm].Properties&TYPE_ENERGY) + { + if (photons[y][x]) + { + kill_part(photons[y][x]>>8); + created_something = 1; + } + } + else if (pmap[y][x]) + { + kill_part(pmap[y][x]>>8); + created_something = 1; + } + } + else if (CreateParts(x, y, 0, 0, fullc, flags)) created_something = 1; }