summaryrefslogtreecommitdiff
path: root/src/elements/ligh.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-10-12 15:58:56 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-13 16:33:21 (GMT)
commitfc4836e69b14b413315deb67c349b7e2badb9c2b (patch)
tree130445f9f5c6289dd32fc9c00bcd936af1108e56 /src/elements/ligh.c
parent2f46dca7c1d0016957dfd88831f453f06e080fef (diff)
downloadpowder-fc4836e69b14b413315deb67c349b7e2badb9c2b.zip
powder-fc4836e69b14b413315deb67c349b7e2badb9c2b.tar.gz
Don't heat elements which don't conduct heat
Diffstat (limited to 'src/elements/ligh.c')
-rw-r--r--src/elements/ligh.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/elements/ligh.c b/src/elements/ligh.c
index f3eb316..1d38a6d 100644
--- a/src/elements/ligh.c
+++ b/src/elements/ligh.c
@@ -114,12 +114,12 @@ int update_LIGH(UPDATE_FUNC_ARGS)
parts[r>>8].life = 4;
pv[y/CELL][x/CELL] += powderful/1200;
- parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/20, MIN_TEMP, MAX_TEMP);
+ if (ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/20, MIN_TEMP, MAX_TEMP);
}
else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT)
{
pv[y/CELL][x/CELL] += powderful/110;
- parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP);
+ if (ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP);
}
if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT)
{
@@ -134,10 +134,13 @@ int update_LIGH(UPDATE_FUNC_ARGS)
}
}
}
- if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT)
- parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/16, MIN_TEMP, MAX_TEMP);
- else
- parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/70, MIN_TEMP, MAX_TEMP);
+ if (ptypes[r&0xFF].hconduct)
+ {
+ if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT)
+ parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/16, MIN_TEMP, MAX_TEMP);
+ else
+ parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/70, MIN_TEMP, MAX_TEMP);
+ }
}
}
if (parts[i].tmp2==3)