summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-06-15 12:11:29 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-15 12:11:29 (GMT)
commit8f97f6c5c78897a4a53a1bc6e86bd6ed48e4e03d (patch)
tree006f26f6be9ac1f3282f2562c5ff2a746ff6e5cf /src
parent5a8c52aeee12e9dc0a08e29fa82821799ab00e1d (diff)
downloadpowder-8f97f6c5c78897a4a53a1bc6e86bd6ed48e4e03d.zip
powder-8f97f6c5c78897a4a53a1bc6e86bd6ed48e4e03d.tar.gz
Revert "Heat simulation improvement."
This reverts commit 5e43bb0510e704b66120391c027c7568f5b6f920.
Diffstat (limited to 'src')
-rw-r--r--src/powder.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/powder.c b/src/powder.c
index 1c06e4d..adb5cb7 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -1638,7 +1638,6 @@ void update_particles_i(pixel *vid, int start, int inc)
hv[y/CELL][x/CELL] -= c_heat;
}
c_heat = 0.0f;
- float c_Cm = 0.0f;
for (j=0; j<8; j++)
{
surround_hconduct[j] = i;
@@ -1651,14 +1650,12 @@ void update_particles_i(pixel *vid, int start, int inc)
&&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG)))
{
surround_hconduct[j] = r>>8;
- c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*ptypes[rt].weight;
- c_Cm += 96.645/ptypes[rt].hconduct*ptypes[rt].weight;
+ c_heat += parts[r>>8].temp;
h_count++;
}
}
- 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)/(h_count+1);
for (j=0; j<8; j++)
{
parts[surround_hconduct[j]].temp = pt;