summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 16:18:03 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 16:18:03 +0200
commitdff77e8e5690b7834652884aadf6c3d5e1ceafd9 (patch)
tree36e6ae622b45712b521683666c13661544c28733 /source/ClientHandle.cpp
parentProtoProxy: Added PACKET_SPAWN_NAMED_ENTITY and PACKET_PLAYER_ANIMATION parsing (diff)
downloadcuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar.gz
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar.bz2
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar.lz
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar.xz
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.tar.zst
cuberite-dff77e8e5690b7834652884aadf6c3d5e1ceafd9.zip
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r--source/ClientHandle.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index a57e71374..0eb24e9e9 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -1170,9 +1170,23 @@ void cClientHandle::HandleEntityAction(int a_EntityID, char a_ActionID)
return;
}
- if( a_ActionID == 3 ) // Leave bed
+ switch (a_ActionID)
{
- m_Player->GetWorld()->BroadcastPlayerAnimation( *m_Player, 3 );
+ case 1: // crouch
+ {
+ m_Player->SetCrouch(true);
+ break;
+ }
+ case 2: // uncrouch
+ {
+ m_Player->SetCrouch(false);
+ break;
+ }
+ case 3: // Leave bed
+ {
+ m_Player->GetWorld()->BroadcastPlayerAnimation(*m_Player, 3);
+ break;
+ }
}
}
@@ -1560,9 +1574,9 @@ void cClientHandle::SendExplosion(double a_BlockX, double a_BlockY, double a_Blo
-void cClientHandle::SendMetadata(const cPawn & a_Pawn)
+void cClientHandle::SendMetadata(const cEntity & a_Entity)
{
- m_Protocol->SendMetadata(a_Pawn);
+ m_Protocol->SendMetadata(a_Entity);
}