summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-25 18:47:27 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-25 18:47:27 (GMT)
commit79727c91936197bbb62669d2dc4dbc0125c8a783 (patch)
tree755f3ca6eab9f6987bbff4e5895ca8c50b816b1b /src/simulation/elements
parenta033fe7e496cfb5c6f4ec78e607408418858e765 (diff)
downloadpowder-79727c91936197bbb62669d2dc4dbc0125c8a783.zip
powder-79727c91936197bbb62669d2dc4dbc0125c8a783.tar.gz
Fix for previous commits
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/CONV.cpp2
-rw-r--r--src/simulation/elements/ICEI.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp
index de31d73..a3e50cf 100644
--- a/src/simulation/elements/CONV.cpp
+++ b/src/simulation/elements/CONV.cpp
@@ -72,7 +72,7 @@ int Element_CONV::update(UPDATE_FUNC_ARGS)
}
}
}
- else if(parts[i].ctype>0 && parts[i].ctype<PT_NUM && sim->elements[parts[i].ctype]->Enabled && parts[i].ctype!=PT_CONV) {
+ else if(parts[i].ctype>0 && parts[i].ctype<PT_NUM && sim->elements[parts[i].ctype].Enabled && parts[i].ctype!=PT_CONV) {
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp
index e355804..3624877 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) && parts[i].temp > ptransitions[PT_SLTW].tlv && 1>(rand()%1000))
+ if (((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW) && parts[i].temp > sim->elements[PT_SLTW].LowTemperature && 1>(rand()%1000))
{
sim->part_change_type(i,x,y,PT_SLTW);
sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW);