1
0

Updated zlib, added chat formatting, fixed upside down stairs and slabs, fixed makefiles, hopefully updated vc project files

git-svn-id: http://mc-server.googlecode.com/svn/trunk@546 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
cedeel@gmail.com
2012-06-03 23:35:17 +00:00
parent 0cc4395a97
commit b17d12c86f
42 changed files with 20589 additions and 19770 deletions

View File

@@ -15,6 +15,7 @@
#include "cItem.h"
#include "cTorch.h"
#include "cStairs.h"
#include "cStep.h"
#include "cDoors.h"
#include "cLadder.h"
#include "cSign.h"
@@ -1017,10 +1018,20 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
if (ClickedBlock == E_BLOCK_STEP)
{
if (MetaData == m_Player->GetWorld()->GetBlockMeta(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ) && a_Packet->m_Direction == 1) //only make double slab if meta values are the same and if player clicked on top of the block (Dir = 1)
// 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_PosY--;
a_Packet->m_ItemType = E_BLOCK_DOUBLE_STEP;
if(a_Packet->m_Direction == 1)
{
a_Packet->m_PosY--;
}
else
{
a_Packet->m_PosY++;
}
bIgnoreCollision = true;
}
}
@@ -1167,6 +1178,12 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
MetaData = cPiston::RotationPitchToMetaData(m_Player->GetRotation(), 0); // Same orientation as pistons, just ignore pitch
break;
}
case E_BLOCK_STEP:
{
MetaData += cStep::DirectionToMetaData( a_Packet->m_Direction );
break;
}
case E_BLOCK_COBBLESTONE_STAIRS:
case E_BLOCK_BRICK_STAIRS:
@@ -1174,7 +1191,7 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
case E_BLOCK_NETHER_BRICK_STAIRS:
case E_BLOCK_WOODEN_STAIRS:
{
MetaData = cStairs::RotationToMetaData(m_Player->GetRotation());
MetaData = cStairs::RotationToMetaData(m_Player->GetRotation(), a_Packet->m_Direction);
break;
}
case E_BLOCK_LADDER: