diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 16:35:10 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 16:35:10 +0100 |
commit | d9c25a161e62ffd04353fbdb10e2ffa1cfe98039 (patch) | |
tree | 686cf865711b7bca0148433f4b799400a6587dbd /source/cRedstone.h | |
parent | Added a CriticalSection to cPlugin_NewLua. Lua plugins are not threadsafe but they ARE accessed by multiple threads, this can create some hard to find errors, but I fixed it now :P (diff) | |
download | cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar.gz cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar.bz2 cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar.lz cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar.xz cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.tar.zst cuberite-d9c25a161e62ffd04353fbdb10e2ffa1cfe98039.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cRedstone.h | 41 |
1 files changed, 21 insertions, 20 deletions
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;
};
|