summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-05-04 20:43:43 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-05-04 20:43:43 (GMT)
commit3799d5ed86e7b508b39544cad3b3346655c804f1 (patch)
tree96ad9594f79b31b2ee7f4c5d37d0d2365ed2fd37 /src/simulation
parent2d8c5a77472159229d920041878e09c003c84ecd (diff)
parent36efb4864412537ff4a48a99337f220d601acc70 (diff)
downloadpowder-3799d5ed86e7b508b39544cad3b3346655c804f1.zip
powder-3799d5ed86e7b508b39544cad3b3346655c804f1.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Simulation.cpp3
-rw-r--r--src/simulation/elements/LAVA.cpp4
-rw-r--r--src/simulation/elements/PSTN.cpp2
-rw-r--r--src/simulation/elements/TUGN.cpp2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index c738fce..499748d 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -4001,6 +4001,9 @@ void Simulation::update_particles_i(int start, int inc)
if (parts[i].ctype>0 && parts[i].ctype<PT_NUM && parts[i].ctype!=PT_LAVA) {
if (parts[i].ctype==PT_THRM&&pt>=elements[PT_BMTL].HighTemperature) s = 0;
else if ((parts[i].ctype==PT_VIBR || parts[i].ctype==PT_BVBR) && pt>=273.15f) s = 0;
+ else if (parts[i].ctype==PT_TUGN) {
+ if (pt>3695.0) s = 0;
+ }
else if (elements[parts[i].ctype].HighTemperatureTransition==PT_LAVA) {
if (pt>=elements[parts[i].ctype].HighTemperature) s = 0;
}
diff --git a/src/simulation/elements/LAVA.cpp b/src/simulation/elements/LAVA.cpp
index 062dcf8..b52c61e 100644
--- a/src/simulation/elements/LAVA.cpp
+++ b/src/simulation/elements/LAVA.cpp
@@ -37,7 +37,7 @@ Element_LAVA::Element_LAVA()
LowPressureTransition = NT;
HighPressure = IPH;
HighPressureTransition = NT;
- LowTemperature = 2573.15f;
+ LowTemperature = 3695.0f;// Highest temperature at which any type of lava can solidify
LowTemperatureTransition = ST;
HighTemperature = ITH;
HighTemperatureTransition = NT;
@@ -68,4 +68,4 @@ int Element_LAVA::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_LAVA::~Element_LAVA() {} \ No newline at end of file
+Element_LAVA::~Element_LAVA() {}
diff --git a/src/simulation/elements/PSTN.cpp b/src/simulation/elements/PSTN.cpp
index 4da1b73..35a470d 100644
--- a/src/simulation/elements/PSTN.cpp
+++ b/src/simulation/elements/PSTN.cpp
@@ -185,7 +185,7 @@ int Element_PSTN::CanMoveStack(Simulation * sim, int stackX, int stackY, int dir
if(spaces >= amount)
break;
} else {
- if(currentPos < maxSize && !retract)
+ if(spaces < maxSize && !retract)
tempParts[currentPos++] = r>>8;
else
return spaces;
diff --git a/src/simulation/elements/TUGN.cpp b/src/simulation/elements/TUGN.cpp
index 2c2c236..f70037b 100644
--- a/src/simulation/elements/TUGN.cpp
+++ b/src/simulation/elements/TUGN.cpp
@@ -40,7 +40,7 @@ Element_TUGN::Element_TUGN()
HighPressureTransition = NT;
LowTemperature = ITL;
LowTemperatureTransition = NT;
- HighTemperature = ITL;
+ HighTemperature = ITH;
HighTemperatureTransition = NT;
/*HighTemperature = 3895.0f;
HighTemperatureTransition = PT_LAVA;*/