summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ICEI.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-25 18:33:40 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-25 18:33:40 (GMT)
commita5d6c56f8cb5eab1d0c9823142c61de97230ee94 (patch)
treed74f18aeebe4932b22adf06fe262d5974fc83fd9 /src/simulation/elements/ICEI.cpp
parentf8766201a688598633e41166225d5e77275a2d5a (diff)
downloadpowder-a5d6c56f8cb5eab1d0c9823142c61de97230ee94.zip
powder-a5d6c56f8cb5eab1d0c9823142c61de97230ee94.tar.gz
TPT: Salt should only melt ice that is above saltwater freezing temperature 3e1d3cd5a6
Diffstat (limited to 'src/simulation/elements/ICEI.cpp')
-rw-r--r--src/simulation/elements/ICEI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp
index fd5dc63..e355804 100644
--- a/src/simulation/elements/ICEI.cpp
+++ b/src/simulation/elements/ICEI.cpp
@@ -61,7 +61,7 @@ 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) && 1>(rand()%1000))
+ if (((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW) && parts[i].temp > ptransitions[PT_SLTW].tlv && 1>(rand()%1000))
{
sim->part_change_type(i,x,y,PT_SLTW);
sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW);