From b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 1 Sep 2013 19:05:58 +0200 Subject: Renamed BLOCK_FACE constants to use the new coord-wise names. The old names are still present, but deprecated. --- source/Defines.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/source/Defines.h b/source/Defines.h index 6bc1a18f6..331b4dd05 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -43,16 +43,24 @@ extern bool g_BlockIsSolid[256]; -/// Block face constants, used in PlayerDigging and PlayerBlockPlacement packets -enum +/// Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc +enum eBlockFace { - BLOCK_FACE_NONE = -1, // Interacting with no block face - swinging the item in the air - BLOCK_FACE_BOTTOM = 0, // Interacting with the bottom face of the block (YM) - BLOCK_FACE_TOP = 1, // Interacting with the top face of the block (YP) - BLOCK_FACE_NORTH = 2, // Interacting with the northern face of the block (ZP) - BLOCK_FACE_SOUTH = 3, // Interacting with the southern face of the block (ZM) - BLOCK_FACE_WEST = 4, // Interacting with the western face of the block (XP) - BLOCK_FACE_EAST = 5, // Interacting with the eastern face of the block (XM) + BLOCK_FACE_NONE = -1, // Interacting with no block face - swinging the item in the air + BLOCK_FACE_XM = 5, // Interacting with the X- face of the block + BLOCK_FACE_XP = 4, // Interacting with the X+ face of the block + BLOCK_FACE_YM = 0, // Interacting with the Y- face of the block + BLOCK_FACE_YP = 1, // Interacting with the Y+ face of the block + BLOCK_FACE_ZM = 3, // Interacting with the Z- face of the block + BLOCK_FACE_ZP = 2, // Interacting with the Z+ face of the block + + // Synonyms using the (deprecated) world directions: + BLOCK_FACE_BOTTOM = BLOCK_FACE_YM, // Interacting with the bottom face of the block + BLOCK_FACE_TOP = BLOCK_FACE_YP, // Interacting with the top face of the block + BLOCK_FACE_NORTH = BLOCK_FACE_ZP, // Interacting with the northern face of the block + BLOCK_FACE_SOUTH = BLOCK_FACE_ZM, // Interacting with the southern face of the block + BLOCK_FACE_WEST = BLOCK_FACE_XP, // Interacting with the western face of the block + BLOCK_FACE_EAST = BLOCK_FACE_XM, // Interacting with the eastern face of the block } ; -- cgit v1.2.3