From 3ac14d94e74e9bc4b75ce49ca7c848c717005c55 Mon Sep 17 00:00:00 2001 From: Cate Date: Thu, 22 Sep 2011 08:02:40 +0800 Subject: Corrected changes to appear properly. I think. Added Explosions with pressure to carbonated water. 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)) 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 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(rand()%250)) { part_change_type(i,x,y,PT_CBNW); -- cgit v0.9.2-21-gd62e