summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:32:43 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:32:43 (GMT)
commitcc8ae0dc4428dd3f8245ba2a37c8685d4fdf5e84 (patch)
tree0249720011de9b672e66506086df0b4ef3ef93cc /src/simulation
parent6af88ee7daaa3bbfd11a468fff15847068220000 (diff)
downloadpowder-cc8ae0dc4428dd3f8245ba2a37c8685d4fdf5e84.zip
powder-cc8ae0dc4428dd3f8245ba2a37c8685d4fdf5e84.tar.gz
TPT: Limit gel tmp value 1c5381662d
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/elements/GEL.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp
index ed1b0eb..79179ea 100644
--- a/src/simulation/elements/GEL.cpp
+++ b/src/simulation/elements/GEL.cpp
@@ -50,6 +50,8 @@ Element_GEL::Element_GEL()
int Element_GEL::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry;
+ if (parts[i].tmp>100) parts[i].tmp = 100;
+ if (parts[i].tmp<0) parts[i].tmp = 0;
for (rx=-2; rx<3; rx++)
for (ry=-2; ry<3; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))