1
0

Fixed anvil placing.

This commit is contained in:
Hownaer 2014-08-28 18:57:56 +02:00
parent e555cb4ab3
commit eaf33e22cf

View File

@ -40,14 +40,15 @@ public:
) override
{
a_BlockType = m_BlockType;
NIBBLETYPE HighBits = a_BlockMeta & 0x0c; // Only highest two bits are preserved
NIBBLETYPE Meta = a_Player->GetEquippedItem().m_ItemDamage;
int Direction = (int)floor(a_Player->GetYaw() * 4.0 / 360.0 + 1.5) & 0x3;
switch (Direction)
{
case 0: a_BlockMeta = 0x2 | HighBits; break;
case 1: a_BlockMeta = 0x3 | HighBits; break;
case 2: a_BlockMeta = 0x0 | HighBits; break;
case 3: a_BlockMeta = 0x1 | HighBits; break;
case 0: a_BlockMeta = 0x2 | Meta << 2; break;
case 1: a_BlockMeta = 0x3 | Meta << 2; break;
case 2: a_BlockMeta = 0x0 | Meta << 2; break;
case 3: a_BlockMeta = 0x1 | Meta << 2; break;
default:
{
return false;