summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockBed.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-31 23:17:49 +0200
committermadmaxoft <github@xoft.cz>2014-07-31 23:17:49 +0200
commit6d02fce9a26d4272baea08dc58238321cca0183a (patch)
tree0109076ae52c67513259d7946a44b9f7b5a563fb /src/Blocks/BlockBed.cpp
parentRemoved trailing whitespace. (diff)
parentMerge pull request #1267 from mc-server/RoofedForest (diff)
downloadcuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.gz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.bz2
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.lz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.xz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.zst
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.zip
Diffstat (limited to 'src/Blocks/BlockBed.cpp')
-rw-r--r--src/Blocks/BlockBed.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index 80ac18560..cd5783f58 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -108,7 +108,7 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
if (Meta & 0x4)
{
- a_Player->SendMessageFailure("This bed is occupied.");
+ a_Player->SendMessageFailure("This bed is occupied");
}
else
{
@@ -133,6 +133,8 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta | 0x4); // Where 0x4 = occupied bit
a_Player->SetIsInBed(true);
+ a_Player->SetBedPos(Vector3i(a_BlockX, a_BlockY, a_BlockZ));
+ a_Player->SendMessageSuccess("Home position set successfully");
cTimeFastForwardTester Tester;
if (a_WorldInterface.ForEachPlayer(Tester))