summaryrefslogtreecommitdiff
path: root/src/simulation/elements/CO2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/CO2.cpp')
-rw-r--r--src/simulation/elements/CO2.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/simulation/elements/CO2.cpp b/src/simulation/elements/CO2.cpp
index 09dbe8c..9eade3d 100644
--- a/src/simulation/elements/CO2.cpp
+++ b/src/simulation/elements/CO2.cpp
@@ -56,7 +56,14 @@ int Element_CO2::update(UPDATE_FUNC_ARGS)
{
r = pmap[y+ry][x+rx];
if (!r)
+ {
+ if (parts[i].ctype==5 && !(rand()%83))
+ {
+ if (sim->create_part(-1, x+rx, y+ry, PT_WATR)>=0)
+ parts[i].ctype = 0;
+ }
continue;
+ }
if ((r&0xFF)==PT_FIRE){
sim->kill_part(r>>8);
if(!(rand()%150)){
@@ -79,11 +86,6 @@ int Element_CO2::update(UPDATE_FUNC_ARGS)
}
}
}
- if (parts[i].ctype==5 && !(rand()%83))
- {
- if (sim->create_part(-1, x+rx, y+ry, PT_WATR)>=0)
- parts[i].ctype = 0;
- }
if (parts[i].temp > 9773.15 && sim->pv[y/CELL][x/CELL] > 200.0f)
{
if (!(rand()%5))