summaryrefslogtreecommitdiff
path: root/src/air.c
diff options
context:
space:
mode:
authorSimon 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)
commitd7fa0b139e5a91c3b1d406e63cae4a6ad79d0cd0 (patch)
tree754ebce0c56f03fe4a8f7e0278584d40c008e2c0 /src/air.c
parentde6203e049a148e16737e76c124fc59d0ed1a862 (diff)
downloadpowder-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.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/air.c b/src/air.c
index 4f2455e..eb7f47f 100644
--- a/src/air.c
+++ b/src/air.c
@@ -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