From bda9b3e342f74e0c98136dcd8b22ba707fa17810 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 16 May 2015 16:49:47 +0100 Subject: [PATCH 1/2] Should Fix sign flipping. Fixes #1118 --- src/Blocks/BlockSignPost.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h index 99c000633..47a6301ae 100644 --- a/src/Blocks/BlockSignPost.h +++ b/src/Blocks/BlockSignPost.h @@ -71,7 +71,7 @@ public: // There are 16 meta values which correspond to different directions. // These values are equated to angles on a circle; 0x08 = 180 degrees. - return (a_Meta < 0x08) ? (0x08 + a_Meta) : (0x08 - a_Meta); + return (a_Meta > 0x08) ? (0x08 - a_Meta) : (0x18 - a_Meta); } @@ -81,7 +81,7 @@ public: // There are 16 meta values which correspond to different directions. // These values are equated to angles on a circle; 0x10 = 360 degrees. - return 0x10 - a_Meta; + return 0x0f - a_Meta; } } ; From c9880b9cb5e2a1c35c2304a4bf9c436411fc671b Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 16 May 2015 16:58:43 +0100 Subject: [PATCH 2/2] Fixed bad logic. --- src/Blocks/BlockSignPost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h index 47a6301ae..f1244394e 100644 --- a/src/Blocks/BlockSignPost.h +++ b/src/Blocks/BlockSignPost.h @@ -71,7 +71,7 @@ public: // There are 16 meta values which correspond to different directions. // These values are equated to angles on a circle; 0x08 = 180 degrees. - return (a_Meta > 0x08) ? (0x08 - a_Meta) : (0x18 - a_Meta); + return (a_Meta < 0x08) ? (0x08 - a_Meta) : (0x18 - a_Meta); }