summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-05 19:28:19 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-05 19:28:19 +0100
commitf32b5aafe824ab1d865ea0df8698ce45ccd1ca8b (patch)
treeba5f6257f478321730c3b7fd4097844920f5e853 /source/cClientHandle.cpp
parentdang finicky OS installs. >.> Bug fixes to make sure this compiles is more than two OS's. (diff)
downloadcuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar.gz
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar.bz2
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar.lz
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar.xz
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.tar.zst
cuberite-f32b5aafe824ab1d865ea0df8698ce45ccd1ca8b.zip
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 003f23f55..2238a3df0 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -17,6 +17,7 @@
#include "cLadder.h"
#include "cSign.h"
#include "cRedstone.h"
+#include "cPiston.h"
#include "cBlockToPickup.h"
#include "cMonster.h"
#include "cChatColor.h"
@@ -487,7 +488,6 @@ void cClientHandle::HandlePacket( cPacket* a_Packet )
break;
case E_BLOCK_DIG:
{
-
//LOG("TimeP: %f", m_Player->GetLastBlockActionTime() );
//LOG("TimeN: %f", cRoot::Get()->GetWorld()->GetTime() );
if ( cRoot::Get()->GetWorld()->GetTime() - m_Player->GetLastBlockActionTime() < 0.1 ) { //only allow block interactions every 0.1 seconds
@@ -788,7 +788,14 @@ void cClientHandle::HandlePacket( cPacket* a_Packet )
MetaData = cRedstone::RepeaterRotationToMetaData( m_Player->GetRotation() );
PacketData->m_ItemType = E_BLOCK_REDSTONE_REPEATER_OFF;
break;
+ case E_BLOCK_PISTON:
+ case E_BLOCK_STICKY_PISTON:
+ MetaData = cPiston::RotationPitchToMetaData( m_Player->GetRotation(), m_Player->GetPitch() );
+ break;
case E_BLOCK_COBBLESTONE_STAIRS:
+ case E_BLOCK_BRICK_STAIRS:
+ case E_BLOCK_STONE_BRICK_STAIRS:
+ case E_BLOCK_NETHER_BRICK_STAIRS:
case E_BLOCK_WOODEN_STAIRS:
MetaData = cStairs::RotationToMetaData( m_Player->GetRotation() );
break;
@@ -1045,9 +1052,10 @@ void cClientHandle::Tick(float a_Dt)
Send( cPacket_UpdateHealth( (short)m_Player->GetHealth() ) );
//quick bugfix to prevent players from spawning in ground
- m_Player->TeleportTo( m_Player->GetPosX(), m_Player->GetPosY()+1, m_Player->GetPosZ() );
+ //m_Player->TeleportTo( m_Player->GetPosX(), m_Player->GetPosY()+1, m_Player->GetPosZ() );
World->UnlockEntities();
+ m_Player->TeleportTo( m_Player->GetPosX(), m_Player->GetPosY()+1, m_Player->GetPosZ() );
}
}