From 37e0e684f41c7407ec0fc7227f6fda2b49443e21 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 11 Sep 2013 17:07:54 +0100 Subject: moved reflection code to PlayerYawToMetadata --- source/Blocks/BlockPumpkin.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/Blocks/BlockPumpkin.h b/source/Blocks/BlockPumpkin.h index 5db4f98e9..375740535 100644 --- a/source/Blocks/BlockPumpkin.h +++ b/source/Blocks/BlockPumpkin.h @@ -22,16 +22,15 @@ public: ) override { a_BlockType = m_BlockType; - double a_Rotation = a_Player->GetRotation() - a_Rotation = -1 * a_Rotation; - a_BlockMeta = PlayerYawToMetaData(a_Rotation); + a_BlockMeta = PlayerYawToMetaData(a_Player->GetRotation()); return true; } inline static NIBBLETYPE PlayerYawToMetaData(double a_Yaw) { - ASSERT((a_Yaw >= -180) && (a_Yaw < 180)); + ASSERT((a_Yaw >= -180) && (a_Yaw < 180)); + a_Yaw *= -1; a_Yaw += 360 + 45; if (a_Yaw > 360) { -- cgit v1.2.3