summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-11 22:39:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:11:59 (GMT)
commitc58a3fb2dc8afe4ce3dbca290afddd4fd906dbb5 (patch)
tree56a1097b42aed728ab88e46255b6baa53bcd3e0e /src
parentb84460d79b35e3e410f9d5ee2cec93d7babc424f (diff)
downloadpowder-c58a3fb2dc8afe4ce3dbca290afddd4fd906dbb5.zip
powder-c58a3fb2dc8afe4ce3dbca290afddd4fd906dbb5.tar.gz
TSNS doesn't detect things with an equal temp (fixes detecting wires)
Diffstat (limited to 'src')
-rw-r--r--src/simulation/Simulation.cpp2
-rw-r--r--src/simulation/elements/TSNS.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index c87f16a..023d90c 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2933,7 +2933,7 @@ int Simulation::create_part(int p, int x, int y, int tv)
case PT_DTEC:
parts[i].tmp2 = 2;
case PT_TSNS:
- parts[i].tmp2 = 1;
+ parts[i].tmp2 = 2;
break;
default:
if (t==PT_FIGH)
diff --git a/src/simulation/elements/TSNS.cpp b/src/simulation/elements/TSNS.cpp
index ceedbb4..d5c8aa7 100644
--- a/src/simulation/elements/TSNS.cpp
+++ b/src/simulation/elements/TSNS.cpp
@@ -28,7 +28,7 @@ Element_TSNS::Element_TSNS()
Temperature = R_TEMP+0.0f +273.15f;
HeatConduct = 0;
- Description = "Creates a spark when there's a nearby particle with equal or greater temperature";
+ Description = "Creates a spark when there's a nearby particle with a greater temperature";
State = ST_SOLID;
Properties = TYPE_SOLID;
@@ -82,7 +82,7 @@ int Element_TSNS::update(UPDATE_FUNC_ARGS)
r = sim->photons[y+ry][x+rx];
if(!r)
continue;
- if (parts[r>>8].temp >= parts[i].temp && parts[r>>8].type != PT_TSNS)
+ if (parts[r>>8].temp > parts[i].temp && parts[r>>8].type != PT_TSNS)
parts[i].life = 1;
}
return 0;