summaryrefslogtreecommitdiff
path: root/Occlusion_Test.cpp
diff options
context:
space:
mode:
authorJapa2011-08-24 02:49:50 +0000
committerJapa2011-08-24 02:49:50 +0000
commit224d0cebea65a0775fb428cfda8d791a86daa2fd (patch)
treeaa42ced485f867b08708e945bc24561aa1d09d11 /Occlusion_Test.cpp
parentcf3d72218fb2fa1a52c65e81aee39c3d912061f0 (diff)
downloadstonesense-224d0cebea65a0775fb428cfda8d791a86daa2fd.tar.gz
stonesense-224d0cebea65a0775fb428cfda8d791a86daa2fd.tar.bz2
stonesense-224d0cebea65a0775fb428cfda8d791a86daa2fd.tar.xz
fixed brook tiles occluding stuff.
Diffstat (limited to 'Occlusion_Test.cpp')
-rw-r--r--Occlusion_Test.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Occlusion_Test.cpp b/Occlusion_Test.cpp
index 7eda812..65f0525 100644
--- a/Occlusion_Test.cpp
+++ b/Occlusion_Test.cpp
@@ -28,6 +28,8 @@ bool is_block_solid(Block * b)
b->material.type == 5 ||
b->material.type == 6)
return false;
+ if(tileTypeTable[b->tileType].shape == BROOK_TOP)
+ return false;
return true;
}
@@ -37,7 +39,7 @@ void mask_center(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType)
+ if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{
@@ -50,7 +52,7 @@ void mask_center(Block * b, int offset)
base_mask_right &= ~(wall_mask_right >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type)
+ else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{
@@ -71,7 +73,7 @@ void mask_left(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType)
+ if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{
@@ -82,7 +84,7 @@ void mask_left(Block * b, int offset)
base_mask_left &= ~(wall_mask_right >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type)
+ else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{
@@ -101,7 +103,7 @@ void mask_right(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType)
+ if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{
@@ -112,7 +114,7 @@ void mask_right(Block * b, int offset)
base_mask_right &= ~(wall_mask_left >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type)
+ else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
{
if(offset >= 0)
{