Fix extra BUBW sometimes being produced when CO2 dissolves

This commit is contained in:
jacksonmj 2012-10-03 15:31:55 +01:00
parent 8c09bf5787
commit fb43f7d23e

View File

@ -38,11 +38,11 @@ int update_CO2(UPDATE_FUNC_ARGS) {
}
if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250))
{
part_change_type(i,x,y,PT_CBNW);
part_change_type(r>>8, x+rx, y+ry, PT_CBNW);
if (parts[i].ctype==5) //conserve number of water particles - ctype=5 means this CO2 hasn't released the water particle from BUBW yet
create_part(r>>8, x+rx, y+ry, PT_CBNW);
create_part(i, x, y, PT_WATR);
else
kill_part(r>>8);
kill_part(i);
}
}
if (parts[i].temp > 9773.15 && pv[y/CELL][x/CELL] > 200.0f)