Fixed clang warnings in BlockHandlers.
This commit is contained in:
parent
45150e9754
commit
42e30b6513
@ -70,7 +70,7 @@ public:
|
|||||||
};
|
};
|
||||||
cCallback Callback(a_Player, a_BlockMeta, static_cast<NIBBLETYPE>(a_BlockFace));
|
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;
|
cWorld * World = (cWorld *) &a_WorldInterface;
|
||||||
World->DoWithMobHeadAt(a_BlockX, a_BlockY, a_BlockZ, Callback);
|
World->DoWithMobHeadAt(a_BlockX, a_BlockY, a_BlockZ, Callback);
|
||||||
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta);
|
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta);
|
||||||
|
@ -103,6 +103,7 @@ public:
|
|||||||
a_BlockMeta = Meta & 0x7; break;
|
a_BlockMeta = Meta & 0x7; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case BLOCK_FACE_NONE: return false;
|
||||||
} // switch (a_BlockFace)
|
} // switch (a_BlockFace)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,9 +30,7 @@ public:
|
|||||||
UNUSED(a_BlockY);
|
UNUSED(a_BlockY);
|
||||||
UNUSED(a_BlockZ);
|
UNUSED(a_BlockZ);
|
||||||
UNUSED(a_CursorX);
|
UNUSED(a_CursorX);
|
||||||
UNUSED(a_CursorY);
|
|
||||||
UNUSED(a_CursorZ);
|
UNUSED(a_CursorZ);
|
||||||
UNUSED(a_BlockMeta);
|
|
||||||
a_BlockType = m_BlockType;
|
a_BlockType = m_BlockType;
|
||||||
a_BlockMeta = RotationToMetaData(a_Player->GetYaw());
|
a_BlockMeta = RotationToMetaData(a_Player->GetYaw());
|
||||||
switch (a_BlockFace)
|
switch (a_BlockFace)
|
||||||
@ -51,10 +49,12 @@ public:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case BLOCK_FACE_NONE: return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual const char * GetStepSound(void) override
|
virtual const char * GetStepSound(void) override
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
|
@ -197,14 +197,14 @@ public:
|
|||||||
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
|
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
|
||||||
{
|
{
|
||||||
// Bits 2 and 4 stay, bits 1 and 3 swap
|
// 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
|
virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override
|
||||||
{
|
{
|
||||||
// Bits 1 and 3 stay, bits 2 and 4 swap
|
// 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user