Permalink
Browse files

fix HEAC conducting to HSWC which is turned off

  • Loading branch information...
jacob1 committed Jul 24, 2017
1 parent 3c4ca5c commit bf9014ac606164daebfefd9e83dcefcdab7abfb5
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/simulation/elements/HEAC.cpp
@@ -136,13 +136,13 @@ int Element_HEAC::update(UPDATE_FUNC_ARGS)
if (x+rrx >= 0 && x+rrx < XRES && y+rry >= 0 && y+rry < YRES && !Element_HEAC::CheckLine<Element_HEAC::IsInsulator>(sim, x, y, x+rrx, y+rry, isInsulator))
{
r = pmap[y+rry][x+rrx];
if (r && sim->elements[r&0xFF].HeatConduct > 0)
if (r && sim->elements[r&0xFF].HeatConduct > 0 && (parts[r>>8].type != PT_HSWC || parts[r>>8].life == 10))
{
count++;
tempAgg += parts[r>>8].temp;
}
r = sim->photons[y+rry][x+rrx];
if (r && sim->elements[r&0xFF].HeatConduct > 0)
if (r && sim->elements[r&0xFF].HeatConduct > 0 && (parts[r>>8].type != PT_HSWC || parts[r>>8].life == 10))
{
count++;
tempAgg += parts[r>>8].temp;
@@ -164,12 +164,12 @@ int Element_HEAC::update(UPDATE_FUNC_ARGS)
if (x+rrx >= 0 && x+rrx < XRES && y+rry >= 0 && y+rry < YRES && !Element_HEAC::CheckLine<Element_HEAC::IsInsulator>(sim, x, y, x+rrx, y+rry, isInsulator))
{
r = pmap[y+rry][x+rrx];
if (r && sim->elements[r&0xFF].HeatConduct > 0)
if (r && sim->elements[r&0xFF].HeatConduct > 0 && (parts[r>>8].type != PT_HSWC || parts[r>>8].life == 10))
{
parts[r>>8].temp = parts[i].temp;
}
r = sim->photons[y+rry][x+rrx];
if (r && sim->elements[r&0xFF].HeatConduct > 0)
if (r && sim->elements[r&0xFF].HeatConduct > 0 && (parts[r>>8].type != PT_HSWC || parts[r>>8].life == 10))
{
parts[r>>8].temp = parts[i].temp;
}

0 comments on commit bf9014a

Please sign in to comment.