summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-12-01 17:17:41 (GMT)
committer jacob1 <jfu614@gmail.com>2012-12-01 17:17:41 (GMT)
commit2a8811190cfb0a3736a24b24561dc0dc0a42b2c7 (patch)
tree387a6d77643cb522556fecaac949d3d7ac0f1246 /src/simulation/elements
parent61e25060aebd54b2b9fbaf85ed1703fbab336eb7 (diff)
downloadpowder-2a8811190cfb0a3736a24b24561dc0dc0a42b2c7.zip
powder-2a8811190cfb0a3736a24b24561dc0dc0a42b2c7.tar.gz
Fix infinite pressure glitch with CLST
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/CLST.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/CLST.cpp b/src/simulation/elements/CLST.cpp
index 3cab1f7..ab62acb 100644
--- a/src/simulation/elements/CLST.cpp
+++ b/src/simulation/elements/CLST.cpp
@@ -50,7 +50,7 @@ Element_CLST::Element_CLST()
int Element_CLST::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry;
- float cxy;
+ float cxy = 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))
@@ -76,7 +76,7 @@ int Element_CLST::update(UPDATE_FUNC_ARGS)
cxy = 0.015;
if(parts[i].temp >= 295 && parts[i].temp <350)
cxy = 0.01;
- if(parts[i].temp > 350)
+ if(parts[i].temp >= 350)
cxy = 0.005;
parts[i].vx += cxy*rx;
parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005.