summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-06-14 17:41:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-14 17:41:01 (GMT)
commitaac8898f42e0e2fb3fcf6a3824ae19d8e676eb8c (patch)
treecc97c6bd2183f2c2cc5328368b0677d3160382a6 /src
parentfe9fd28b70f673cb3b2d4e7e0c345a7458416554 (diff)
downloadpowder-aac8898f42e0e2fb3fcf6a3824ae19d8e676eb8c.zip
powder-aac8898f42e0e2fb3fcf6a3824ae19d8e676eb8c.tar.gz
Prevent photons stealing heat energy
Diffstat (limited to 'src')
-rw-r--r--src/powder.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/powder.c b/src/powder.c
index 1c06e4d..0c46daa 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -1646,7 +1646,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if ((r>>8)>=NPART || !r)
continue;
rt = r&0xFF;
- if (rt&&ptypes[rt].hconduct&&(rt!=PT_HSWC||parts[r>>8].life==10)
+ if (rt&&ptypes[rt].hconduct&&ptypes[rt].weight>0&&(rt!=PT_HSWC||parts[r>>8].life==10)
&&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG))
&&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG)))
{
@@ -1657,8 +1657,7 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
- pt = parts[i].temp = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*ptypes[t].weight)
- /(c_Cm+96.645/ptypes[t].hconduct*ptypes[t].weight);
+ pt = parts[i].temp = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*ptypes[t].weight)/(c_Cm+96.645/ptypes[t].hconduct*ptypes[t].weight);
for (j=0; j<8; j++)
{
parts[surround_hconduct[j]].temp = pt;