From 17486c785331e809f5294fee40367b1590e0d36b Mon Sep 17 00:00:00 2001 From: faketruth Date: Sat, 29 Sep 2012 20:43:42 +0000 Subject: Beds can be slept in now (it doesn't change the time though) git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ClientHandle.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 1585a08b0..af0f686d1 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -962,6 +962,24 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) +void cClientHandle::HandleEntityAction(int a_EntityID, char a_ActionID) +{ + if( a_EntityID != m_Player->GetUniqueID() ) + { + // We should only receive entity actions from the entity that is performing the action + return; + } + + if( a_ActionID == 3 ) // Leave bed + { + m_Player->GetWorld()->BroadcastPlayerAnimation( *m_Player, 3 ); + } +} + + + + + void cClientHandle::SendData(const char * a_Data, int a_Size) { { @@ -1461,6 +1479,15 @@ void cClientHandle::SendBlockBreakAnim(int a_entityID, int a_blockX, int a_block +void cClientHandle::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) +{ + m_Protocol->SendUseBed(a_Entity, a_BlockX, a_BlockY, a_BlockZ); +} + + + + + void cClientHandle::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) { // Check chunks being sent, erase them from m_ChunksToSend: -- cgit v1.2.3