summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-31 11:47:03 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-31 11:47:03 +0200
commit0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318 (patch)
tree16625ae2959346d18a2958b24c7f94d5057aa2d5 /src
parentBetter SetOpen() and IsOpen() function from the doors. (diff)
downloadcuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar.gz
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar.bz2
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar.lz
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar.xz
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.tar.zst
cuberite-0b7ed0f4934b75f959d13ce7b8a4c73cb88ce318.zip
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockDoor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index c1e4de9d4..d8ce916fa 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -137,12 +137,13 @@ public:
static NIBBLETYPE IsOpen(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
{
- NIBBLETYPE Meta = GetMetaFromRightDoor(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
+ NIBBLETYPE Meta = GetTrueDoorMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
return ((Meta & 0x4) != 0);
}
- static NIBBLETYPE GetMetaFromRightDoor(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
+ /** Read the meta from the true part of the door and returns a meta with all infos include. */
+ static NIBBLETYPE GetTrueDoorMeta(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
{
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
@@ -162,7 +163,7 @@ public:
static void SetOpen(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_Open)
{
BLOCKTYPE Block = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ);
- NIBBLETYPE Meta = GetMetaFromRightDoor(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
+ NIBBLETYPE Meta = GetTrueDoorMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
if (!IsDoor(Block))
{