summaryrefslogtreecommitdiff
path: root/src/elements/co2.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/co2.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/co2.c')
-rw-r--r--src/elements/co2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/elements/co2.c b/src/elements/co2.c
index afe4af3..3bc86a8 100644
--- a/src/elements/co2.c
+++ b/src/elements/co2.c
@@ -1,7 +1,7 @@
#include <element.h>
int update_CO2(UPDATE_FUNC_ARGS) {
- int r, rx, ry;
+ int r, rx, ry, np;
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))
@@ -16,6 +16,11 @@ int update_CO2(UPDATE_FUNC_ARGS) {
return 1;
}
}
+ if ((r)&&parts[i].ctype==5)
+ {
+ parts[i].ctype = 0;
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_WATR);
+ }
if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250))
{
part_change_type(i,x,y,PT_CBNW);