summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/DTEC.cpp4
-rw-r--r--src/simulation/elements/TSNS.cpp4
2 files changed, 6 insertions, 2 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;
diff --git a/src/simulation/elements/TSNS.cpp b/src/simulation/elements/TSNS.cpp
index 5c8a23b..ceedbb4 100644
--- a/src/simulation/elements/TSNS.cpp
+++ b/src/simulation/elements/TSNS.cpp
@@ -78,7 +78,9 @@ int Element_TSNS::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].temp >= parts[i].temp && parts[r>>8].type != PT_TSNS)
parts[i].life = 1;