diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-04-27 18:54:26 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-05-05 19:33:42 (GMT) |
| commit | a7b5718c6a25a671ba8efba8f8d659ce1c45216a (patch) | |
| tree | f55e7c801bf6ced535f60b94a7d97e10b9f27867 /src | |
| parent | ddaed2ad6951b212d44e5752b11c08dcf80c76c0 (diff) | |
| download | powder-a7b5718c6a25a671ba8efba8f8d659ce1c45216a.zip powder-a7b5718c6a25a671ba8efba8f8d659ce1c45216a.tar.gz | |
Fixes for previous commit
Previous commit caused buggy movement in walls
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/powder.c b/src/powder.c index 533fc49..b399f91 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1459,13 +1459,10 @@ void update_particles_i(pixel *vid, int start, int inc) if (nx||ny) { surround[j] = r = pmap[y+ny][x+nx]; j++; - if (!bmap[(y+ny)/CELL][(x+nx)/CELL] || bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_STREAM) - { - if (!(r&0xFF)) - surround_space = 1;//there is empty space - if ((r&0xFF)!=t) - nt = 1;//there is nothing or a different particle - } + if (!(r&0xFF)) + surround_space = 1;//there is empty space + if ((r&0xFF)!=t) + nt = 1;//there is nothing or a different particle } } @@ -1972,7 +1969,7 @@ killed: else s = 0; } else s = 0; - // s==0 means particle has not yet moved, allow liquids code to run + // s==0 means particle has not yet moved, allow rest of movement code to run if (s==0 && ptypes[t].falldown>1 && (parts[i].vy>fabs(parts[i].vx) || gravityMode==2)) { s = 0; @@ -2032,7 +2029,7 @@ killed: parts[i].vx *= ptypes[t].collision; parts[i].vy *= ptypes[t].collision; } - else + else if (s==0) { if ((clear_x!=x||clear_y!=y) && try_move(i, x, y, clear_x, clear_y)) { // if interpolation was done, try moving to last clear position |
