summaryrefslogtreecommitdiff
path: root/src/simulation/elements/DTEC.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-17 16:21:45 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-17 16:21:45 (GMT)
commitd357fcdc36e931d2f561fc8e684618d572a35e6d (patch)
treeedf4f4b46e145fbf3aab19c66c89a7a58e85d35d /src/simulation/elements/DTEC.cpp
parentb617b8b6565f7c87e2bd1e984f9a17d49743634c (diff)
downloadpowder-d357fcdc36e931d2f561fc8e684618d572a35e6d.zip
powder-d357fcdc36e931d2f561fc8e684618d572a35e6d.tar.gz
add back bounds check to DTEC/TSNS where needed, change VIBR back to 5x5 loop checks
a better way to change it to 3x3 may have to be found that has the same ratios, other elements like WATRs have their rates changed too
Diffstat (limited to 'src/simulation/elements/DTEC.cpp')
-rw-r--r--src/simulation/elements/DTEC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp
index 69218e6..71bbf8b 100644
--- a/src/simulation/elements/DTEC.cpp
+++ b/src/simulation/elements/DTEC.cpp
@@ -75,7 +75,7 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS)
}
for (rx=-rd; rx<rd+1; rx++)
for (ry=-rd; ry<rd+1; ry++)
- if (BOUNDS_CHECK && (rx || ry))
+ if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
if(!r)