From c58a3fb2dc8afe4ce3dbca290afddd4fd906dbb5 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 11 Oct 2012 18:39:58 -0400 Subject: [PATCH] TSNS doesn't detect things with an equal temp (fixes detecting wires) --- src/simulation/Simulation.cpp | 2 +- src/simulation/elements/TSNS.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c87f16ac1..023d90c92 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 ceedbb4ab..d5c8aa72d 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;