diff --git a/src/elements/clst.c b/src/elements/clst.c index 36046cd9f..8fe1a6c03 100644 --- a/src/elements/clst.c +++ b/src/elements/clst.c @@ -27,7 +27,7 @@ int update_CLST(UPDATE_FUNC_ARGS) { continue; if ((r&0xFF)==PT_WATR && 1>(rand()%1500)) { - part_change_type(i,x,y,PT_PSTS); + part_change_type(i,x,y,PT_PSTS); kill_part(r>>8); } if ((r&0xFF)==PT_NITR) diff --git a/src/elements/gel.c b/src/elements/gel.c index c64591a02..828761689 100644 --- a/src/elements/gel.c +++ b/src/elements/gel.c @@ -30,12 +30,32 @@ int update_GEL(UPDATE_FUNC_ARGS) { continue; //Desaturation - if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) - && parts[i].tmp<100) + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_FRZW) && parts[i].tmp<100) { parts[i].tmp++; kill_part(r>>8); } + if (((r&0xFF)==PT_PSTE) && parts[i].tmp<100) + { + parts[i].tmp++; + create_part(r>>8, x+rx, y+ry, PT_CLST); + } + if (((r&0xFF)==PT_SLTW) && parts[i].tmp<100) + { + parts[i].tmp++; + if (rand()%4) + kill_part(r>>8); + else + part_change_type(r>>8, x+rx, y+ry, PT_SALT); + } + if (((r&0xFF)==PT_CBNW) && parts[i].tmp<100) + { + parts[i].tmp++; + if (rand()%4) + kill_part(r>>8); + else + part_change_type(r>>8, x+rx, y+ry, PT_CO2); + } if ((r&0xFF)==PT_SPNG && parts[i].tmp<100 && ((parts[r>>8].life+1)>parts[i].tmp)) { diff --git a/src/elements/spng.c b/src/elements/spng.c index 2e4d1efd5..b99d12b50 100644 --- a/src/elements/spng.c +++ b/src/elements/spng.c @@ -26,11 +26,32 @@ int update_SPNG(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_WATR&&33>=rand()/(RAND_MAX/100)+1) + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_FRZW)&&33>=rand()/(RAND_MAX/100)+1) { parts[i].life++; kill_part(r>>8); } + if ((r&0xFF)==PT_SLTW&&33>=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + if (rand()%4) + kill_part(r>>8); + else + part_change_type(r>>8, x+rx, y+ry, PT_SALT); + } + if ((r&0xFF)==PT_CBNW&&33>=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + if (rand()%4) + kill_part(r>>8); + else + part_change_type(r>>8, x+rx, y+ry, PT_CO2); + } + if ((r&0xFF)==PT_PSTE&&33>=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + create_part(r>>8, x+rx, y+ry, PT_CLST); + } } } else