diff options
| author | Phil <cracker642@gmail.com> | 2010-09-08 23:43:06 (GMT) |
|---|---|---|
| committer | Phil <cracker642@gmail.com> | 2010-09-09 00:25:19 (GMT) |
| commit | 8e3383909b0301c14eee2b7f3473c4df095d77e0 (patch) | |
| tree | e8924c71afe42900bf201362f35665c99f44ff7c /air.c | |
| parent | d28edfa6a9932b479efa36cdb9448354081c09ab (diff) | |
| download | powder-8e3383909b0301c14eee2b7f3473c4df095d77e0.zip powder-8e3383909b0301c14eee2b7f3473c4df095d77e0.tar.gz | |
Added specific element erase, right click on element in menu, then right click on eraser, the one to be erased will have a light blue box around it. works for walls too.
changed some wall code because it looks like someone just put random numbers in.
fixed a wall bug
Diffstat (limited to 'air.c')
| -rw-r--r-- | air.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -54,15 +54,15 @@ void update_air(void) vy[y][x] *= VLOSS; vx[y][x] += dx*TSTEPV; vy[y][x] += dy*TSTEPV; - if(bmap[y][x]==1 || bmap[y][x+1]==1 || - bmap[y][x]==8 || bmap[y][x+1]==8 || - (bmap[y][x]==7 && !emap[y][x]) || - (bmap[y][x+1]==7 && !emap[y][x+1])) + if(bmap[y][x]==11 || bmap[y][x+1]==11 || + bmap[y][x]==2 || bmap[y][x+1]==2 || + (bmap[y][x]==3 && !emap[y][x]) || + (bmap[y][x+1]==3 && !emap[y][x+1])) vx[y][x] = 0; - if(bmap[y][x]==1 || bmap[y+1][x]==1 || - bmap[y][x]==8 || bmap[y+1][x]==8 || - (bmap[y][x]==7 && !emap[y][x]) || - (bmap[y+1][x]==7 && !emap[y+1][x])) + if(bmap[y][x]==11 || bmap[y+1][x]==11 || + bmap[y][x]==2 || bmap[y+1][x]==2 || + (bmap[y][x]==3 && !emap[y][x]) || + (bmap[y+1][x]==3 && !emap[y+1][x])) vy[y][x] = 0; } @@ -76,9 +76,9 @@ void update_air(void) for(i=-1; i<2; i++) if(y+j>0 && y+j<YRES/CELL-1 && x+i>0 && x+i<XRES/CELL-1 && - bmap[y+j][x+i]!=1 && - bmap[y+j][x+i]!=8 && - (bmap[y+j][x+i]!=7 || emap[y+j][x+i])) + bmap[y+j][x+i]!=11 && + bmap[y+j][x+i]!=2 && + (bmap[y+j][x+i]!=8 || emap[y+j][x+i])) { f = kernel[i+1+(j+1)*3]; dx += vx[y+j][x+i]*f; @@ -118,7 +118,7 @@ void update_air(void) dy += VADV*tx*ty*vy[j+1][i+1]; } - if(bmap[y][x] == 4) + if(bmap[y][x] == 7) { dx += fvx[y][x]; dy += fvy[y][x]; |
