summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-08-28 17:25:18 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-29 11:28:11 (GMT)
commit65445c51f11d9f7d0db626c0797a622294da67ce (patch)
tree1367de4b8a02acd5c4204f0bc14715d255be39bb /src
parente1959c0c0bd2291232701b799ec1560c9962ff85 (diff)
downloadpowder-65445c51f11d9f7d0db626c0797a622294da67ce.zip
powder-65445c51f11d9f7d0db626c0797a622294da67ce.tar.gz
Fix rapid decrease in pressure with GAS/NBLE
Diffstat (limited to 'src')
-rw-r--r--src/powder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c
index df88f9d..3f68c18 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -1604,8 +1604,9 @@ void update_particles_i(pixel *vid, int start, int inc)
pv[y/CELL+1][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL+1][x/CELL]);
if (x+CELL<XRES)
{
- pv[y/CELL][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL+1]);
- if (y+CELL<YRES)
+ if (pv[y/CELL][x/CELL+1]<3.5f)
+ pv[y/CELL][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL+1]);
+ if (y+CELL<YRES && pv[y/CELL+1][x/CELL+1]<3.5f)
pv[y/CELL+1][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL+1][x/CELL+1]);
}
}