summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-05-07 22:50:13 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-05-07 22:50:13 (GMT)
commit1c5381662d4d2b7cc6cf0c56e4b08607882a780a (patch)
treeaabd963c48851529c21e542f5c0faf4621c700a7 /src/elements
parent11bd67eb6102a137ebd6496e54914a7031d4fc3e (diff)
downloadpowder-1c5381662d4d2b7cc6cf0c56e4b08607882a780a.zip
powder-1c5381662d4d2b7cc6cf0c56e4b08607882a780a.tar.gz
Limit gel tmp value
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/gel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/elements/gel.c b/src/elements/gel.c
index 2a3f89f..b805dd6 100644
--- a/src/elements/gel.c
+++ b/src/elements/gel.c
@@ -17,6 +17,8 @@
int update_GEL(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))