diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 18:42:53 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 18:42:53 (GMT) |
| commit | a033fe7e496cfb5c6f4ec78e607408418858e765 (patch) | |
| tree | a94e07b4cad1b0e81809682c5b48eee88c075e7e /src/simulation/elements/PBCN.cpp | |
| parent | a5d6c56f8cb5eab1d0c9823142c61de97230ee94 (diff) | |
| download | powder-a033fe7e496cfb5c6f4ec78e607408418858e765.zip powder-a033fe7e496cfb5c6f4ec78e607408418858e765.tar.gz | |
TPT: Add ptypes.enabled checks to a few more places 61f39f5464
Diffstat (limited to 'src/simulation/elements/PBCN.cpp')
| -rw-r--r-- | src/simulation/elements/PBCN.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp index 088f807..e3bc7ce 100644 --- a/src/simulation/elements/PBCN.cpp +++ b/src/simulation/elements/PBCN.cpp @@ -65,7 +65,7 @@ int Element_PBCN::update(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 || !sim->elements[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) @@ -105,7 +105,7 @@ int Element_PBCN::update(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 && sim->elements[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++) { |
