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)