diff options
author | madmaxoft <github@xoft.cz> | 2014-04-01 14:55:46 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-04-01 14:58:17 +0200 |
commit | 42e30b6513c8f905d419dd6621ad11959eea9dc9 (patch) | |
tree | b39128934b921247a36339194e9321688375a134 /src/Blocks | |
parent | Fixed clang warnings in cFile. (diff) | |
download | cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar.gz cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar.bz2 cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar.lz cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar.xz cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.tar.zst cuberite-42e30b6513c8f905d419dd6621ad11959eea9dc9.zip |
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockMobHead.h | 2 | ||||
-rw-r--r-- | src/Blocks/BlockSlab.h | 1 | ||||
-rw-r--r-- | src/Blocks/BlockStairs.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockVine.h | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h index 080843a73..c4f41ba34 100644 --- a/src/Blocks/BlockMobHead.h +++ b/src/Blocks/BlockMobHead.h @@ -70,7 +70,7 @@ public: }; cCallback Callback(a_Player, a_BlockMeta, static_cast<NIBBLETYPE>(a_BlockFace)); - a_BlockMeta = a_BlockFace; + a_BlockMeta = (NIBBLETYPE)a_BlockFace; cWorld * World = (cWorld *) &a_WorldInterface; World->DoWithMobHeadAt(a_BlockX, a_BlockY, a_BlockZ, Callback); a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta); diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h index 77e8b8e55..4f94d45f6 100644 --- a/src/Blocks/BlockSlab.h +++ b/src/Blocks/BlockSlab.h @@ -103,6 +103,7 @@ public: a_BlockMeta = Meta & 0x7; break; } } + case BLOCK_FACE_NONE: return false; } // switch (a_BlockFace) return true; } diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h index 1072b7e71..09ff254a6 100644 --- a/src/Blocks/BlockStairs.h +++ b/src/Blocks/BlockStairs.h @@ -30,9 +30,7 @@ public: UNUSED(a_BlockY); UNUSED(a_BlockZ); UNUSED(a_CursorX); - UNUSED(a_CursorY); UNUSED(a_CursorZ); - UNUSED(a_BlockMeta); a_BlockType = m_BlockType; a_BlockMeta = RotationToMetaData(a_Player->GetYaw()); switch (a_BlockFace) @@ -51,10 +49,12 @@ public: } break; } + case BLOCK_FACE_NONE: return false; } return true; } + virtual const char * GetStepSound(void) override { if ( diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h index e796a45ae..7bb9dc484 100644 --- a/src/Blocks/BlockVine.h +++ b/src/Blocks/BlockVine.h @@ -197,14 +197,14 @@ public: virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override { // Bits 2 and 4 stay, bits 1 and 3 swap - return ((a_Meta & 0x0a) | ((a_Meta & 0x01) << 2) | ((a_Meta & 0x04) >> 2)); + return (NIBBLETYPE)((a_Meta & 0x0a) | ((a_Meta & 0x01) << 2) | ((a_Meta & 0x04) >> 2)); } virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override { // Bits 1 and 3 stay, bits 2 and 4 swap - return ((a_Meta & 0x05) | ((a_Meta & 0x02) << 2) | ((a_Meta & 0x08) >> 2)); + return (NIBBLETYPE)((a_Meta & 0x05) | ((a_Meta & 0x02) << 2) | ((a_Meta & 0x08) >> 2)); } } ; |