summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornarroo <narroo@vt.edu>2014-03-26 13:54:17 +0100
committernarroo <narroo@vt.edu>2014-03-26 13:54:17 +0100
commit90415ff79886f63cacced59f202228ddac69765a (patch)
tree9a39389f1a6e89b8a287c7164402d79b917f59e7
parentAdded a comment about the behavior of doors under mirros. Simply put, the current implementation of MetaMirror causes glitchy behavior. The door class itself needs to be edited. (I've got an idea on that....) (diff)
downloadcuberite-90415ff79886f63cacced59f202228ddac69765a.tar
cuberite-90415ff79886f63cacced59f202228ddac69765a.tar.gz
cuberite-90415ff79886f63cacced59f202228ddac69765a.tar.bz2
cuberite-90415ff79886f63cacced59f202228ddac69765a.tar.lz
cuberite-90415ff79886f63cacced59f202228ddac69765a.tar.xz
cuberite-90415ff79886f63cacced59f202228ddac69765a.tar.zst
cuberite-90415ff79886f63cacced59f202228ddac69765a.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockDoor.cpp7
-rw-r--r--src/Blocks/BlockRail.h12
-rw-r--r--src/Blocks/BlockSlab.h2
3 files changed, 12 insertions, 9 deletions
diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp
index 100f48e6c..479c68153 100644
--- a/src/Blocks/BlockDoor.cpp
+++ b/src/Blocks/BlockDoor.cpp
@@ -146,7 +146,8 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorXY(NIBBLETYPE a_Meta)
// Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored
// in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time,
- // so the function can only see either the hinge position or orientation, but not both, at any given time.
+ // so the function can only see either the hinge position or orientation, but not both, at any given time. The class itself
+ // needs extra datamembers.
if (a_Meta & 0x08) return a_Meta;
// Holds open/closed meta data. 0x0C == 1100.
@@ -172,7 +173,9 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorYZ(NIBBLETYPE a_Meta)
// Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored
// in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time,
- // so the function can only see either the hinge position or orientation, but not both, at any given time.
+ // so the function can only see either the hinge position or orientation, but not both, at any given time.The class itself
+ // needs extra datamembers.
+
if (a_Meta & 0x08) return a_Meta;
// Holds open/closed meta data. 0x0C == 1100.
diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h
index f56ec7152..477707a91 100644
--- a/src/Blocks/BlockRail.h
+++ b/src/Blocks/BlockRail.h
@@ -453,8 +453,8 @@ public:
case 0x02: return 0x04 + OtherMeta; // Asc. East -> Asc. North
case 0x04: return 0x03 + OtherMeta; // Asc. North -> Asc. West
- case 0x03: return 0x05 + OtherMeta; // Asc. West -> Asc. South
- case 0x05: return 0x02 + OtherMeta; // Asc. South -> Asc. East
+ case 0x03: return 0x05 + OtherMeta; // Asc. West -> Asc. South
+ case 0x05: return 0x02 + OtherMeta; // Asc. South -> Asc. East
}
}
else
@@ -489,8 +489,8 @@ public:
case 0x02: return 0x05 + OtherMeta; // Asc. East -> Asc. South
case 0x05: return 0x03 + OtherMeta; // Asc. South -> Asc. West
- case 0x03: return 0x04 + OtherMeta; // Asc. West -> Asc. North
- case 0x04: return 0x02 + OtherMeta; // Asc. North -> Asc. East
+ case 0x03: return 0x04 + OtherMeta; // Asc. West -> Asc. North
+ case 0x04: return 0x02 + OtherMeta; // Asc. North -> Asc. East
}
}
else
@@ -521,7 +521,7 @@ public:
switch (a_Meta & 0x07)
{
case 0x05: return 0x04 + OtherMeta; // Asc. South -> Asc. North
- case 0x04: return 0x05 + OtherMeta; // Asc. North -> Asc. South
+ case 0x04: return 0x05 + OtherMeta; // Asc. North -> Asc. South
}
}
else
@@ -552,7 +552,7 @@ public:
switch (a_Meta & 0x07)
{
case 0x02: return 0x03 + OtherMeta; // Asc. East -> Asc. West
- case 0x03: return 0x02 + OtherMeta; // Asc. West -> Asc. East
+ case 0x03: return 0x02 + OtherMeta; // Asc. West -> Asc. East
}
}
else
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index b18bf7ef3..77e8b8e55 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -186,7 +186,7 @@ public:
virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
{
- NIBBLETYPE OtherMeta = a_Meta & 0x07; // Contains unrelate meta data.
+ NIBBLETYPE OtherMeta = a_Meta & 0x07; // Contains unrelated meta data.
// 8th bit is up/down. 1 right-side-up, 0 is up-side-down.
return (a_Meta & 0x08) ? 0x00 + OtherMeta : 0x01 + OtherMeta;