Corrected changes to appear properly. I think. Added Explosions with pressure to carbonated water.
This commit is contained in:
parent
848fa77a82
commit
3ac14d94e7
@ -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))
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user