diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-02-23 21:15:54 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-02-24 01:15:39 (GMT) |
| commit | a64c202834e34760016932d401d0fb71b17ba56d (patch) | |
| tree | 778aa11f6e88534b67d4585322de882b14cae68f /src | |
| parent | 1b9b1752a77ec0bd9c9d9b02a6a0103f1e7f8c21 (diff) | |
| download | powder-a64c202834e34760016932d401d0fb71b17ba56d.zip powder-a64c202834e34760016932d401d0fb71b17ba56d.tar.gz | |
Fix lava freezing point
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/powder.c b/src/powder.c index ba2cd17..11215d2 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1568,10 +1568,12 @@ void update_particles_i(pixel *vid, int start, int inc) } else if (t==PT_LAVA) { if (parts[i].ctype && parts[i].ctype<PT_NUM && parts[i].ctype!=PT_LAVA) { - if (ptransitions[parts[i].ctype].tht==PT_LAVA&&pt>=ptransitions[parts[i].ctype].thv) s = 0; - else if (parts[i].ctype==PT_THRM&&pt>=ptransitions[PT_BMTL].thv) s = 0; + if (parts[i].ctype==PT_THRM&&pt>=ptransitions[PT_BMTL].thv) s = 0; + else if (ptransitions[parts[i].ctype].tht==PT_LAVA) { + if (pt>=ptransitions[parts[i].ctype].thv) s = 0; + } else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype - else { + if (s) { t = parts[i].ctype; parts[i].ctype = PT_NONE; if (t==PT_THRM) { |
