summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-14 22:44:04 +0100
committerMattes D <github@xoft.cz>2015-03-14 22:44:04 +0100
commit65d2ef32e920580ab5408bd1e2fcb3da42c8eec1 (patch)
treebfbef765d31cf6b78490f013dad5d600e785195e /src/ClientHandle.cpp
parentMerge pull request #1808 from tumultenrx/master (diff)
parentReverted non-functional changes (diff)
downloadcuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.gz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.bz2
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.lz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.xz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.zst
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 4fbce2b67..ec10ac521 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -21,6 +21,7 @@
#include "Items/ItemHandler.h"
#include "Blocks/BlockHandler.h"
#include "Blocks/BlockSlab.h"
+#include "Blocks/BlockBed.h"
#include "Blocks/ChunkInterface.h"
#include "Root.h"
@@ -1501,30 +1502,6 @@ void cClientHandle::HandleAnimation(int a_Animation)
return;
}
- // Because the animation ID sent to servers by clients are different to those sent back, we need this
- switch (a_Animation)
- {
- case 0: // No animation - wiki.vg doesn't say that client has something specific for it, so I suppose it will just become -1
- case 1:
- case 2:
- case 3:
- {
- a_Animation--; // Offset by -1
- break;
- }
- case 5:
- case 6:
- case 7:
- {
- a_Animation -= 2; // Offset by -2
- break;
- }
- default: // Anything else is the same
- {
- break;
- }
- }
-
m_Player->GetWorld()->BroadcastEntityAnimation(*m_Player, a_Animation, this);
}
@@ -1766,7 +1743,9 @@ void cClientHandle::HandleEntityLeaveBed(int a_EntityID)
return;
}
- m_Player->GetWorld()->BroadcastEntityAnimation(*m_Player, 2);
+ cChunkInterface Interface(GetPlayer()->GetWorld()->GetChunkMap());
+ cBlockBedHandler::SetBedOccupationState(Interface, GetPlayer()->GetLastBedPos(), false);
+ GetPlayer()->SetIsInBed(false);
}