diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-03-10 20:43:27 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-03-10 20:43:27 (GMT) |
| commit | 3b048f8a0634973e45703373d22bd9360a6c170c (patch) | |
| tree | a4fac03f3d2ca057b1a1604ece16bf84215c2826 /src/powder.c | |
| parent | ca1cd0da065a1774dbeeba161139f580ab7f711a (diff) | |
| download | powder-3b048f8a0634973e45703373d22bd9360a6c170c.zip powder-3b048f8a0634973e45703373d22bd9360a6c170c.tar.gz | |
merge merge merge
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/powder.c b/src/powder.c index af91808..e15565b 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1575,10 +1575,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) { @@ -1995,7 +1997,9 @@ killed: if (try_move(i, x, y, j, clear_y)) { parts[i].x = clear_xf+(j-clear_x); + parts[i].y = clear_yf; nx = j; + ny = clear_y; s = 1; break; } @@ -2007,11 +2011,11 @@ killed: else r = -1; if (s) - for (j=clear_y+r; j>=0 && j<YRES && j>=clear_y-rt && j<clear_y+rt; j+=r) + for (j=ny+r; j>=0 && j<YRES && j>=ny-rt && j<ny+rt; j+=r) { - if (try_move(i, x, y, nx, j)) + if (try_move(i, nx, ny, nx, j)) { - parts[i].y = clear_yf+(j-clear_y); + parts[i].y += j-ny; break; } if ((pmap[j][nx]&255)!=t || (bmap[j/CELL][nx/CELL] && bmap[j/CELL][nx/CELL]!=WL_STREAM)) |
