summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ICEI.cpp
diff options
context:
space:
mode:
authorcracker64 <cracker642@gmail.com>2013-03-01 05:41:53 (GMT)
committer cracker64 <cracker642@gmail.com>2013-03-01 05:41:53 (GMT)
commit0d70547cf059b5bd0a7a4a0acd9251fb94c6115e (patch)
tree99a0b212eeecee83662d963da052b439375acbf3 /src/simulation/elements/ICEI.cpp
parent5873d6958641af21b92fcb039d26c336331f19e7 (diff)
downloadpowder-0d70547cf059b5bd0a7a4a0acd9251fb94c6115e.zip
powder-0d70547cf059b5bd0a7a4a0acd9251fb94c6115e.tar.gz
More fixes to fix fixes and new fixes to fix stuff.
Diffstat (limited to 'src/simulation/elements/ICEI.cpp')
-rw-r--r--src/simulation/elements/ICEI.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp
index 995da9e..4e10c92 100644
--- a/src/simulation/elements/ICEI.cpp
+++ b/src/simulation/elements/ICEI.cpp
@@ -61,16 +61,18 @@ int Element_ICEI::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
- if (((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW) && parts[i].temp > sim->elements[PT_SLTW].LowTemperature && !(rand()%1000))
+ if ((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW)
{
- sim->part_change_type(i,x,y,PT_SLTW);
- sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
- goto done;
+ if (parts[i].temp > sim->elements[PT_SLTW].LowTemperature && !(rand()%1000))
+ {
+ sim->part_change_type(i,x,y,PT_SLTW);
+ sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
+ return 0;
+ }
}
else if (((r&0xFF)==PT_FRZZ) && (parts[i].ctype=PT_FRZW) && !(rand()%1000))
sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI);
}
- done:
return 0;
}