diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-10 20:27:36 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-10 20:27:36 (GMT) |
| commit | 0b09d2e0f3261c5db41136315df070673780553d (patch) | |
| tree | 8df8df5856ca23d41ce58389f0d216e2cd960652 /src/simulation/elements/DTEC.cpp | |
| parent | da07c22ee457899236c8c6d457696daa019fd07e (diff) | |
| download | powder-0b09d2e0f3261c5db41136315df070673780553d.zip powder-0b09d2e0f3261c5db41136315df070673780553d.tar.gz | |
Allow TSNS and DTEC to detect photons and other energy particles. Set default TSNS radius to 1 to make it easier to avoid detecting the wire connections
Diffstat (limited to 'src/simulation/elements/DTEC.cpp')
| -rw-r--r-- | src/simulation/elements/DTEC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp index 38161cf..6d67cf2 100644 --- a/src/simulation/elements/DTEC.cpp +++ b/src/simulation/elements/DTEC.cpp @@ -84,7 +84,9 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS) if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) { r = pmap[y+ry][x+rx]; - if (!r) + if(!r) + r = sim->photons[y+ry][x+rx]; + if(!r) continue; if (parts[r>>8].type == parts[i].ctype && (parts[i].ctype != PT_LIFE || parts[i].tmp == parts[r>>8].tmp)) parts[i].life = 1; |
