summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);
}