TSNS doesn't detect things with an equal temp (fixes detecting wires)

This commit is contained in:
jacob1 2012-10-11 18:39:58 -04:00 committed by Simon Robertshaw
parent b84460d79b
commit c58a3fb2dc
2 changed files with 3 additions and 3 deletions

View File

@ -2933,7 +2933,7 @@ int Simulation::create_part(int p, int x, int y, int tv)
case PT_DTEC: case PT_DTEC:
parts[i].tmp2 = 2; parts[i].tmp2 = 2;
case PT_TSNS: case PT_TSNS:
parts[i].tmp2 = 1; parts[i].tmp2 = 2;
break; break;
default: default:
if (t==PT_FIGH) if (t==PT_FIGH)

View File

@ -28,7 +28,7 @@ Element_TSNS::Element_TSNS()
Temperature = R_TEMP+0.0f +273.15f; Temperature = R_TEMP+0.0f +273.15f;
HeatConduct = 0; 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; State = ST_SOLID;
Properties = TYPE_SOLID; Properties = TYPE_SOLID;
@ -82,7 +82,7 @@ int Element_TSNS::update(UPDATE_FUNC_ARGS)
r = sim->photons[y+ry][x+rx]; r = sim->photons[y+ry][x+rx];
if(!r) if(!r)
continue; 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; parts[i].life = 1;
} }
return 0; return 0;