From 7b0fdaa20454f8e94840bb1222cf3bd8710df0b4 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Fri, 3 Jan 2014 11:41:52 +0000 Subject: [PATCH] Use >= for high temperature transition comparisons and < for low temperature transitions Fixes http://tpt.io/~1419883 --- src/simulation/Simulation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index ffe980e15..24cedf164 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3805,7 +3805,7 @@ void Simulation::update_particles_i(int start, int inc) if ((t==PT_ICEI || t==PT_SNOW) && (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || parts[i].ctype==PT_ICEI || parts[i].ctype==PT_SNOW || !elements[parts[i].ctype].Enabled)) parts[i].ctype = PT_WATR; - if (elements[t].HighTemperatureTransition>-1 && ctemph>elements[t].HighTemperature) + if (elements[t].HighTemperatureTransition>-1 && ctemph>=elements[t].HighTemperature) { // particle type change due to high temperature #ifdef REALISTIC @@ -3831,7 +3831,7 @@ void Simulation::update_particles_i(int start, int inc) { if (parts[i].ctype > 0 && parts[i].ctype < PT_NUM && parts[i].ctype != t) { - if (elements[parts[i].ctype].LowTemperatureTransition==t && pt<=elements[parts[i].ctype].LowTemperature) + if (elements[parts[i].ctype].LowTemperatureTransition==t && pt3695.0) + if (pt>=3695.0) s = 0; } else if (elements[parts[i].ctype].HighTemperatureTransition == PT_LAVA)