diff options
Diffstat (limited to 'src/elements/pbcn.c')
| -rw-r--r-- | src/elements/pbcn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/pbcn.c b/src/elements/pbcn.c index edb3f9f..2754a1a 100644 --- a/src/elements/pbcn.c +++ b/src/elements/pbcn.c @@ -32,7 +32,7 @@ int update_PBCN(UPDATE_FUNC_ARGS) { return 1; } } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !ptypes[parts[i].ctype].enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES) @@ -72,7 +72,7 @@ int update_PBCN(UPDATE_FUNC_ARGS) { } } } - if (parts[i].ctype>0 && parts[i].ctype<PT_NUM && parts[i].life==10) { + if (parts[i].ctype>0 && parts[i].ctype<PT_NUM && ptypes[parts[i].ctype].enabled && parts[i].life==10) { if (parts[i].ctype==PT_PHOT) {//create photons a different way for (rx=-1; rx<2; rx++) { for (ry=-1; ry<2; ry++) |
