Skip to content

Commit

Permalink
add airblock wall
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jul 3, 2014
1 parent f68fadb commit b59ecf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/simulation/Simulation.cpp
Expand Up @@ -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;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/simulation/SimulationData.cpp
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion src/simulation/SimulationData.h
Expand Up @@ -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
Expand Down

0 comments on commit b59ecf2

Please sign in to comment.