diff options
author | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 22:06:25 +0200 |
---|---|---|
committer | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 22:06:25 +0200 |
commit | 7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e (patch) | |
tree | 2d272099a2959dd30b4830bdf9f75ce40c8e55d0 /source | |
parent | Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually work (diff) | |
download | cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar.gz cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar.bz2 cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar.lz cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar.xz cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.tar.zst cuberite-7450e573c3f3cb4f48e3be4b7865bf1fd4dd6b4e.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/cClientHandle.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 58c344d4f..92388301c 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -1031,23 +1031,32 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet) if (ClickedBlock == E_BLOCK_STEP) { - // Only make double slab if meta values are the same and if player clicked either on top or on bottom of the block (direction either 0 or 1) - // TODO check if it works from beneath + // Only make double slab if meta values are the same and if player clicked either on top or on bottom of the block (direction either 0 or 1) + // TODO check if it works from beneath if (MetaData == ( m_Player->GetWorld()->GetBlockMeta(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ) & 0x7) && a_Packet->m_Direction <= 1) //if (MetaData == m_Player->GetWorld()->GetBlockMeta(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ) && a_Packet->m_Direction == 1) { - a_Packet->m_ItemType = E_BLOCK_DOUBLE_STEP; + a_Packet->m_ItemType = E_BLOCK_DOUBLE_STEP; if(a_Packet->m_Direction == 1) - { - a_Packet->m_PosY--; - } - else - { - a_Packet->m_PosY++; - } + { + a_Packet->m_PosY--; + } + else + { + a_Packet->m_PosY++; + } bIgnoreCollision = true; } } + + if (ClickedBlock == E_BLOCK_SNOW) + { + if (a_Packet->m_Direction == 1) + { + a_Packet->m_PosY--; + } + bIgnoreCollision = true; + } // Special handling for special items: switch (a_Packet->m_ItemType) @@ -2082,3 +2091,5 @@ void cClientHandle::SocketClosed(void) + + |