summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockDoor.cpp
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-19 22:19:36 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-19 22:19:36 +0100
commit05d71675f69e13d8ab590a33b38ee6d0f8a77b6f (patch)
tree97453620e42516f0e6da1e969397e14becdc15b4 /source/Blocks/BlockDoor.cpp
parentImplemented double doors (diff)
downloadcuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.gz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.bz2
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.lz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.xz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.zst
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.zip
Diffstat (limited to 'source/Blocks/BlockDoor.cpp')
-rw-r--r--source/Blocks/BlockDoor.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/Blocks/BlockDoor.cpp b/source/Blocks/BlockDoor.cpp
index 1976e2f20..a2c352d7b 100644
--- a/source/Blocks/BlockDoor.cpp
+++ b/source/Blocks/BlockDoor.cpp
@@ -69,19 +69,10 @@ void cBlockDoorHandler::PlaceBlock(cWorld * a_World, cPlayer * a_Player, NIBBLET
{
a_BlockMeta = cDoors::RotationToMetaData(a_Player->GetRotation());
char a_TopBlockMeta = 8;
- if((a_BlockMeta == 0) && (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ - 1) == m_BlockType))
- {
- a_TopBlockMeta = 9;
- }
- else if((a_BlockMeta == 1) && (a_World->GetBlock(a_BlockX + 1, a_BlockY, a_BlockZ) == m_BlockType))
- {
- a_TopBlockMeta = 9;
- }
- else if((a_BlockMeta == 2) && (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ + 1) == m_BlockType))
- {
- a_TopBlockMeta = 9;
- }
- else if((a_BlockMeta == 3) && (a_World->GetBlock(a_BlockX - 1, a_BlockY, a_BlockZ) == m_BlockType))
+ if( (a_BlockMeta == 0) && (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ - 1) == m_BlockType) ||
+ (a_BlockMeta == 1) && (a_World->GetBlock(a_BlockX + 1, a_BlockY, a_BlockZ) == m_BlockType) ||
+ (a_BlockMeta == 2) && (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ + 1) == m_BlockType) ||
+ (a_BlockMeta == 3) && (a_World->GetBlock(a_BlockX - 1, a_BlockY, a_BlockZ) == m_BlockType))
{
a_TopBlockMeta = 9;
}