From 5ded005b0c17d8e4c1799733ee63810c9e9f7976 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 28 Aug 2012 12:40:18 +0100 Subject: Correct proportions of CO2 and WATR when GEL/SPNG is absorbing BUBW diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp index b42c4ba..a51eddd 100644 --- a/src/simulation/elements/GEL.cpp +++ b/src/simulation/elements/GEL.cpp @@ -82,10 +82,7 @@ int Element_GEL::update(UPDATE_FUNC_ARGS) if (((r&0xFF)==PT_CBNW) && parts[i].tmp<100) { parts[i].tmp++; - if (rand()%4) - sim->kill_part(r>>8); - else - sim->part_change_type(r>>8, x+rx, y+ry, PT_CO2); + sim->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/simulation/elements/SPNG.cpp b/src/simulation/elements/SPNG.cpp index dc4c711..712f727 100644 --- a/src/simulation/elements/SPNG.cpp +++ b/src/simulation/elements/SPNG.cpp @@ -75,10 +75,7 @@ int Element_SPNG::update(UPDATE_FUNC_ARGS) if ((r&0xFF)==PT_CBNW&&33>=rand()/(RAND_MAX/100)+1) { parts[i].life++; - if (rand()%4) - sim->kill_part(r>>8); - else - sim->part_change_type(r>>8, x+rx, y+ry, PT_CO2); + sim->part_change_type(r>>8, x+rx, y+ry, PT_CO2); } if ((r&0xFF)==PT_PSTE&&33>=rand()/(RAND_MAX/100)+1) { -- cgit v0.9.2-21-gd62e