diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-29 22:43:42 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-29 22:43:42 +0200 |
commit | 17486c785331e809f5294fee40367b1590e0d36b (patch) | |
tree | 3104a260f3eac320a190af73a3dced00cb77bcfe /source/ClientHandle.cpp | |
parent | Fixed memory leaks in cWindow and cProtocolRecognizer (diff) | |
download | cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.gz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.bz2 cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.lz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.xz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.zst cuberite-17486c785331e809f5294fee40367b1590e0d36b.zip |
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r-- | source/ClientHandle.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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: |