Skip to content

Commit

Permalink
fix flood fill delete on normal particles also deleting photons
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Nov 30, 2015
1 parent 998f5a4 commit 9cab695
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9cab695

Please sign in to comment.