From d9c25a161e62ffd04353fbdb10e2ffa1cfe98039 Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 22 Feb 2012 15:35:10 +0000 Subject: Added a crude way of disabling redstone. It's necessary though, redstone is completely broken, crashes the server all the time git-svn-id: http://mc-server.googlecode.com/svn/trunk@312 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cRedstone.h | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'source/cRedstone.h') diff --git a/source/cRedstone.h b/source/cRedstone.h index 92f01f5d9..44641fbdf 100644 --- a/source/cRedstone.h +++ b/source/cRedstone.h @@ -5,30 +5,31 @@ class cRedstone { public: -cRedstone( cWorld* a_World ); + cRedstone( cWorld* a_World ); -static char RepeaterRotationToMetaData( float a_Rotation ) -{ - a_Rotation += 90 + 45; // So its not aligned with axis - if( a_Rotation > 360.f ) a_Rotation -= 360.f; - if( a_Rotation >= 0.f && a_Rotation < 90.f ) - return 0x1; - else if( a_Rotation >= 180 && a_Rotation < 270 ) - return 0x3; - else if( a_Rotation >= 90 && a_Rotation < 180 ) - return 0x2; - else - return 0x0; -} + static char RepeaterRotationToMetaData( float a_Rotation ) + { + a_Rotation += 90 + 45; // So its not aligned with axis + if( a_Rotation > 360.f ) a_Rotation -= 360.f; + if( a_Rotation >= 0.f && a_Rotation < 90.f ) + return 0x1; + else if( a_Rotation >= 180 && a_Rotation < 270 ) + return 0x3; + else if( a_Rotation >= 90 && a_Rotation < 180 ) + return 0x2; + else + return 0x0; + } -void CalculatetRedstone( int, int, int ); -void ChangeRedstone( int, int, int, bool ); -bool IsBlockPowered( int, int, int ); + void CalculateRedstone( int, int, int ); + void ChangeRedstone( int, int, int, bool ); + bool IsBlockPowered( int, int, int ); -cWorld* m_World; + cWorld* m_World; -char m_Metadata; -char m_Direction; + char m_Metadata; + char m_Direction; + static bool s_UseRedstone; }; -- cgit v1.2.3