mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-09 18:06:33 +02:00
fix HEAC conducting to HSWC which is turned off
This commit is contained in:
@@ -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))
|
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];
|
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++;
|
count++;
|
||||||
tempAgg += parts[r>>8].temp;
|
tempAgg += parts[r>>8].temp;
|
||||||
}
|
}
|
||||||
r = sim->photons[y+rry][x+rrx];
|
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++;
|
count++;
|
||||||
tempAgg += parts[r>>8].temp;
|
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))
|
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];
|
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;
|
parts[r>>8].temp = parts[i].temp;
|
||||||
}
|
}
|
||||||
r = sim->photons[y+rry][x+rrx];
|
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;
|
parts[r>>8].temp = parts[i].temp;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user