summaryrefslogtreecommitdiff
path: root/src/simulation/elements/TSNS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/TSNS.cpp')
-rw-r--r--src/simulation/elements/TSNS.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/TSNS.cpp b/src/simulation/elements/TSNS.cpp
index 6e6461f..d82194c 100644
--- a/src/simulation/elements/TSNS.cpp
+++ b/src/simulation/elements/TSNS.cpp
@@ -75,7 +75,7 @@ int Element_TSNS::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)