summaryrefslogtreecommitdiff
path: root/src/elements/cbnw.c
diff options
context:
space:
mode:
authorCate <cate@cate-6sh2.(none)>2011-09-22 00:02:40 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-22 17:11:57 (GMT)
commit3ac14d94e74e9bc4b75ce49ca7c848c717005c55 (patch)
tree66dfcf8ea86a24e22c6720f03cf252a3dcf1db6d /src/elements/cbnw.c
parent848fa77a829f5257bc72796d3281b91a925787dc (diff)
downloadpowder-3ac14d94e74e9bc4b75ce49ca7c848c717005c55.zip
powder-3ac14d94e74e9bc4b75ce49ca7c848c717005c55.tar.gz
Corrected changes to appear properly. I think. Added Explosions with pressure to carbonated water.
Diffstat (limited to 'src/elements/cbnw.c')
-rw-r--r--src/elements/cbnw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/elements/cbnw.c b/src/elements/cbnw.c
index 1834879..60b1bf3 100644
--- a/src/elements/cbnw.c
+++ b/src/elements/cbnw.c
@@ -3,6 +3,15 @@
int update_CBNW(UPDATE_FUNC_ARGS) {
int r, rx, ry, oldt;
oldt = parts[i].tmp;
+ if (pv[y/CELL][x/CELL]<=1)
+ {
+ if(20>(rand()%20000))
+ {
+ part_change_type(i,x,y,PT_CO2);
+ parts[i].ctype = 5;
+ pv[y/CELL][x/CELL] += 0.5f;
+ }
+ }
if (parts[i].tmp>0)
parts[i].tmp--;
if(!(rand()%200))