Permalink
Browse files

fix flood fill delete on normal particles also deleting photons

  • Loading branch information...
jacob1 committed Nov 30, 2015
1 parent 998f5a4 commit 9cab6959b699512081a438b1b47c557ee3a8ed18
Showing with 17 additions and 1 deletion.
  1. +17 −1 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;
}

0 comments on commit 9cab695

Please sign in to comment.