diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-11 20:02:58 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-11 20:02:58 (GMT) |
| commit | d7fa0b139e5a91c3b1d406e63cae4a6ad79d0cd0 (patch) | |
| tree | 754ebce0c56f03fe4a8f7e0278584d40c008e2c0 /src/air.c | |
| parent | de6203e049a148e16737e76c124fc59d0ed1a862 (diff) | |
| download | powder-d7fa0b139e5a91c3b1d406e63cae4a6ad79d0cd0.zip powder-d7fa0b139e5a91c3b1d406e63cae4a6ad79d0cd0.tar.gz | |
New element: Titanium, absorbs some neutrons, acts as a solid wall to air. Move blockair filling into update_particles so it can be used by elements
Diffstat (limited to 'src/air.c')
| -rw-r--r-- | src/air.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -57,11 +57,7 @@ void update_airh(void) { int x, y, i, j; float odh, dh, dx, dy, f, tx, ty; - for (y=0; y<YRES/CELL; y++) - for (x=0; x<XRES/CELL; x++) - { - bmap_blockairh[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_GRAV || (bmap[y][x]==WL_EWALL && !emap[y][x])); - } + for (i=0; i<YRES/CELL; i++) //reduces pressure/velocity on the edges every frame { hv[i][0] = 295.15f; @@ -138,12 +134,7 @@ void update_air(void) { int x, y, i, j; float dp, dx, dy, f, tx, ty; - - for (y=0; y<YRES/CELL; y++) - for (x=0; x<XRES/CELL; x++) - { - bmap_blockair[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || (bmap[y][x]==WL_EWALL && !emap[y][x])); - } + if (airMode != 4) { //airMode 4 is no air/pressure update for (i=0; i<YRES/CELL; i++) //reduces pressure/velocity on the edges every frame |
