summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-22 21:51:34 +0200
committermadmaxoft <github@xoft.cz>2014-06-23 00:15:55 +0200
commitd61ff4da3b9b6581d22e2a1d068dfb09143b0ad6 (patch)
tree735d8351e9c8f41b804d26532743aed1becd3fd5 /src
parentPrefabs don't draw into chunk if they don't intersect. (diff)
downloadcuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar.gz
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar.bz2
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar.lz
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar.xz
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.tar.zst
cuberite-d61ff4da3b9b6581d22e2a1d068dfb09143b0ad6.zip
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockLever.h11
-rw-r--r--src/Blocks/BlockSign.h6
2 files changed, 9 insertions, 8 deletions
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index ad2ae29e5..f1d3ff6d2 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -7,12 +7,13 @@
class cBlockLeverHandler :
- public cMetaRotator<cBlockHandler, 0x07, 0x04, 0x02, 0x03, 0x01, false>
+ public cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>
{
- typedef cMetaRotator<cBlockHandler, 0x07, 0x04, 0x02, 0x03, 0x01, false> super;
+ typedef cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false> super;
+
public:
- cBlockLeverHandler(BLOCKTYPE a_BlockType)
- : cMetaRotator<cBlockHandler, 0x07, 0x04, 0x02, 0x03, 0x01, false>(a_BlockType)
+ cBlockLeverHandler(BLOCKTYPE a_BlockType) :
+ super(a_BlockType)
{
}
@@ -132,7 +133,7 @@ public:
case 0x05: return 0x06; // Ground rotation
case 0x06: return 0x05;
- default: return super::MetaRotateCCW(a_Meta); // Wall Rotation
+ default: return super::MetaRotateCW(a_Meta); // Wall Rotation
}
}
} ;
diff --git a/src/Blocks/BlockSign.h b/src/Blocks/BlockSign.h
index 9d6fede21..f5630bdb0 100644
--- a/src/Blocks/BlockSign.h
+++ b/src/Blocks/BlockSign.h
@@ -75,13 +75,13 @@ public:
virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override
{
- return (++a_Meta) & 0x0F;
+ return (a_Meta + 4) & 0x0f;
}
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override
{
- return (--a_Meta) & 0x0F;
+ return (a_Meta + 12) & 0x0f;
}
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
@@ -90,7 +90,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) : (0x08 - a_Meta);
}