diff options
| author | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-02 17:37:59 (GMT) |
|---|---|---|
| committer | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-02 17:49:56 (GMT) |
| commit | 5b1210714d3909139886cc7f8a72291580fc0eeb (patch) | |
| tree | 25ef9d98fc12239901e46054814fb9a77caf5a73 /src/powder.c | |
| parent | 77bcac1a5628aecdf8e4c1968106e3bed86890ab (diff) | |
| download | powder-5b1210714d3909139886cc7f8a72291580fc0eeb.zip powder-5b1210714d3909139886cc7f8a72291580fc0eeb.tar.gz | |
More fixes
Fix PHOT and FWRK.
Fix QRTZ conductivity (broken by removing PROP_CONDUCTS)
Add some things lost during rewrite: NTCT/PTCT not heated if INSL in the way;
boiling point varies with pressure.
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/powder.c b/src/powder.c index f8a5d3d..b9495a7 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1127,7 +1127,7 @@ int nearest_part(int ci, int t) void update_particles_i(pixel *vid, int start, int inc) { int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors; - float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp; + float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp, ctemph, ctempl; int fin_x, fin_y, clear_x, clear_y; float fin_xf, fin_yf, clear_xf, clear_yf; float nn, ct1, ct2, swappage; @@ -1522,8 +1522,16 @@ void update_particles_i(pixel *vid, int start, int inc) parts[surround_hconduct[j]].temp = pt; } + ctemph = ctempl = pt; + // change boiling point with pressure + if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht<PT_NUM && ptypes[ptransitions[t].tht].state==ST_GAS) + || t==PT_LNTG || t==PT_SLTW) + ctemph -= 2.0f*pv[y/CELL][x/CELL]; + else if ((ptypes[t].state==ST_GAS && ptransitions[t].tlt>-1 && ptransitions[t].tlt<PT_NUM && ptypes[ptransitions[t].tlt].state==ST_LIQUID) + || t==PT_WTRV) + ctempl -= 2.0f*pv[y/CELL][x/CELL]; s = 1; - if (pt>ptransitions[t].thv&&ptransitions[t].tht>-1) { + if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { // particle type change due to high temperature if (ptransitions[t].tht!=PT_NUM) t = ptransitions[t].tht; @@ -1544,7 +1552,7 @@ void update_particles_i(pixel *vid, int start, int inc) else t = PT_WTRV; } else s = 0; - } else if (pt<ptransitions[t].tlv&&ptransitions[t].tlt>-1) { + } else if (ctempl<ptransitions[t].tlv&&ptransitions[t].tlt>-1) { // particle type change due to low temperature if (ptransitions[t].tlt!=PT_NUM) t = ptransitions[t].tlt; |
