diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-22 22:36:24 +0100 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-22 22:36:24 +0100 |
commit | 24efa6f8645c2f310997c212907fb4e591d0afec (patch) | |
tree | ff6d43fb6a9af7838b0dc41908f895f71d9aef5c /source/cClientHandle.cpp | |
parent | Fixes: (diff) | |
download | cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar.gz cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar.bz2 cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar.lz cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar.xz cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.tar.zst cuberite-24efa6f8645c2f310997c212907fb4e591d0afec.zip |
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r-- | source/cClientHandle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index a1e24c576..b8de73467 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -503,7 +503,7 @@ void cClientHandle::HandlePacket( cPacket* a_Packet ) m_Player->SetLastBlockActionCnt(LastActionCnt+1);
if (LastActionCnt > 3) { //kick if more than 3 interactions per .1 seconds
LOGWARN("Player %s tried to interact with a block too quickly! (could indicate bot) Was Kicked.", GetUsername() );
- //To many false-positives :s for example on a minimal server lagg :s should be re checked
+ //TODO Too many false-positives :s for example on a minimal server lagg :s should be re checked
Kick("You're a baaaaaad boy!");
break;
}
@@ -524,6 +524,7 @@ void cClientHandle::HandlePacket( cPacket* a_Packet ) char OldBlock = World->GetBlock(PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
char MetaData = World->GetBlockMeta(PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
bool bBroken = (PacketData->m_Status == 0x02) || g_BlockOneHitDig[(int)OldBlock] || ( (PacketData->m_Status == 0x00) && (m_Player->GetGameMode() == 1) );
+ if(bBroken == false) bBroken = (m_Player->GetInventory().GetEquippedItem().m_ItemID == E_ITEM_SHEARS && OldBlock == E_BLOCK_LEAVES);
cItem PickupItem;
if( bBroken && !(m_Player->GetGameMode() == 1) ) // broken
|