From 944dec3a4e26e72e6d6760e7e8b081ba8476b126 Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 6 Mar 2012 21:56:12 +0000 Subject: Fixed redstone repeater bug where it could not get the direction when it has delay bits set git-svn-id: http://mc-server.googlecode.com/svn/trunk@377 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cRedstone.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/cRedstone.h b/source/cRedstone.h index 26e9a6319..5c971ad36 100644 --- a/source/cRedstone.h +++ b/source/cRedstone.h @@ -25,7 +25,7 @@ public: static bool IsRepeaterPointingTo( const Vector3i & a_RepeaterPos, char a_MetaData, const Vector3i & a_BlockPos ) { - switch( a_MetaData ) + switch( a_MetaData & 0x3 ) { case 0x0: if( (a_RepeaterPos - a_BlockPos).Equals( Vector3i( 0, 0, 1 ) ) ) @@ -59,7 +59,7 @@ public: static bool IsRepeaterPointingAway( const Vector3i & a_RepeaterPos, char a_MetaData, const Vector3i & a_BlockPos ) { - switch( a_MetaData ) + switch( a_MetaData & 0x3 ) { case 0x0: if( (a_RepeaterPos - a_BlockPos).Equals( Vector3i( 0, 0,-1 ) ) ) @@ -93,7 +93,7 @@ public: static Vector3i GetRepeaterDirection( char a_MetaData ) { - switch( a_MetaData ) + switch( a_MetaData & 0x3 ) { case 0x0: return Vector3i( 0, 0,-1 ); -- cgit v1.2.3