Skip to content

Commit

Permalink
fix HEAC conducting to HSWC which is turned off
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jul 24, 2017
1 parent 3c4ca5c commit bf9014a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/simulation/elements/HEAC.cpp
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit bf9014a

Please sign in to comment.