From b59ecf2d657497af51d8e4a38d334638272b41b0 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 3 Jul 2014 14:30:12 -0400 Subject: [PATCH] add airblock wall --- src/simulation/Simulation.cpp | 4 ++-- src/simulation/SimulationData.cpp | 1 + src/simulation/SimulationData.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 192723c2f..cd4e5c845 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -4798,8 +4798,8 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu { if (emap[y][x]) emap[y][x] --; - air->bmap_blockair[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || (bmap[y][x]==WL_EWALL && !emap[y][x])); - air->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])) ? 0x8:0; + air->bmap_blockair[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_BLOCKAIR || (bmap[y][x]==WL_EWALL && !emap[y][x])); + air->bmap_blockairh[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_BLOCKAIR || bmap[y][x]==WL_GRAV || (bmap[y][x]==WL_EWALL && !emap[y][x])) ? 0x8:0; } } } diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index d3c74fec3..9ddd03128 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -130,6 +130,7 @@ wall_type * LoadWalls(int & wallCount) {PIXPACK(0x579777), PIXPACK(0x000000), 1, Renderer::WallIcon, "GAS WALL", "Allows gases, blocks all other particles."}, {PIXPACK(0xFFEE00), PIXPACK(0xAA9900), 4, Renderer::WallIcon, "GRAVITY WALL", "Gravity wall. Newtonian Gravity has no effect inside a box drawn with this."}, {PIXPACK(0xFFAA00), PIXPACK(0xAA5500), 4, Renderer::WallIcon, "ENERGY WALL", "Allows energy particles, blocks all other particles."}, + {PIXPACK(0xDCDCDC), PIXPACK(0x000000), 1, Renderer::WallIcon, "AIRBLOCK WALL", "Allows all particles, but blocks air."}, }; wallCount = UI_WALLCOUNT; wall_type * wtypesT = (wall_type*)malloc(UI_WALLCOUNT*sizeof(wall_type)); diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 2dc275f2d..00c693646 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -54,9 +54,10 @@ #define WL_ALLOWGAS 13 #define WL_GRAV 14 #define WL_ALLOWENERGY 15 +#define WL_BLOCKAIR 16 #define WL_FLOODHELPER 255 -#define UI_WALLCOUNT 16 +#define UI_WALLCOUNT 17 #define OLD_SPC_AIR 236 #define SPC_AIR 256