From fb43f7d23e99765ae093fc45608901cb5907d1d8 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Wed, 3 Oct 2012 15:31:55 +0100 Subject: [PATCH] Fix extra BUBW sometimes being produced when CO2 dissolves --- src/elements/co2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/co2.c b/src/elements/co2.c index e92385e1b..d25b5f5da 100644 --- a/src/elements/co2.c +++ b/src/elements/co2.c @@ -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)