diff options
author | Mattes D <github@xoft.cz> | 2015-05-16 14:11:56 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-05-16 14:11:56 +0200 |
commit | 0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807 (patch) | |
tree | d5625c7c412e3e72b6b9560000f1c62540374773 /src/Blocks | |
parent | PathFinder uses UniquePtr for cell map. (diff) | |
parent | Bed uses bottom two bits for direction not three (diff) | |
download | cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar.gz cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar.bz2 cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar.lz cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar.xz cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.tar.zst cuberite-0b536701b43f48d5d0e18ca1d2f8d11fbe6d7807.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockBed.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp index e56f4bfe0..dfa392d9b 100644 --- a/src/Blocks/BlockBed.cpp +++ b/src/Blocks/BlockBed.cpp @@ -14,7 +14,7 @@ void cBlockBedHandler::OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInt NIBBLETYPE OldMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); Vector3i ThisPos( a_BlockX, a_BlockY, a_BlockZ); - Vector3i Direction = MetaDataToDirection( OldMeta & 0x7); + Vector3i Direction = MetaDataToDirection( OldMeta & 0x3); if (OldMeta & 0x8) { // Was pillow @@ -111,7 +111,7 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface // Is foot end VERIFY((Meta & 0x4) != 0x4); // Occupied flag should never be set, else our compilator (intended) is broken - PillowDirection = MetaDataToDirection(Meta & 0x7); + PillowDirection = MetaDataToDirection(Meta & 0x3); if (a_ChunkInterface.GetBlock(a_BlockX + PillowDirection.x, a_BlockY, a_BlockZ + PillowDirection.z) == E_BLOCK_BED) // Must always use pillow location for sleeping { a_WorldInterface.GetBroadcastManager().BroadcastUseBed(*a_Player, a_BlockX + PillowDirection.x, a_BlockY, a_BlockZ + PillowDirection.z); |