Fix infinite spark loops in photoelectric effect
This commit is contained in:
parent
c48641dd67
commit
d037178bb5
@ -2887,7 +2887,7 @@ void Simulation::photoelectric_effect(int nx, int ny)//create sparks from PHOT w
|
|||||||
{
|
{
|
||||||
unsigned r = pmap[ny][nx];
|
unsigned r = pmap[ny][nx];
|
||||||
|
|
||||||
if (TYP(r) == PT_PSCN)
|
if (TYP(r) == PT_PSCN && !parts[ID(r)].life)
|
||||||
{
|
{
|
||||||
if (TYP(pmap[ny][nx-1]) == PT_NSCN || TYP(pmap[ny][nx+1]) == PT_NSCN ||
|
if (TYP(pmap[ny][nx-1]) == PT_NSCN || TYP(pmap[ny][nx+1]) == PT_NSCN ||
|
||||||
TYP(pmap[ny-1][nx]) == PT_NSCN || TYP(pmap[ny+1][nx]) == PT_NSCN)
|
TYP(pmap[ny-1][nx]) == PT_NSCN || TYP(pmap[ny+1][nx]) == PT_NSCN)
|
||||||
|
Reference in New Issue
Block a user