summaryrefslogtreecommitdiff
path: root/src/utility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.cpp')
-rw-r--r--src/utility.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/utility.cpp b/src/utility.cpp
index 8befaaeec..65615f9c9 100644
--- a/src/utility.cpp
+++ b/src/utility.cpp
@@ -88,6 +88,41 @@ const v3s16 g_26dirs[26] =
// 26
};
+const v3s16 g_27dirs[27] =
+{
+ // +right, +top, +back
+ v3s16( 0, 0, 1), // back
+ v3s16( 0, 1, 0), // top
+ v3s16( 1, 0, 0), // right
+ v3s16( 0, 0,-1), // front
+ v3s16( 0,-1, 0), // bottom
+ v3s16(-1, 0, 0), // left
+ // 6
+ v3s16(-1, 1, 0), // top left
+ v3s16( 1, 1, 0), // top right
+ v3s16( 0, 1, 1), // top back
+ v3s16( 0, 1,-1), // top front
+ v3s16(-1, 0, 1), // back left
+ v3s16( 1, 0, 1), // back right
+ v3s16(-1, 0,-1), // front left
+ v3s16( 1, 0,-1), // front right
+ v3s16(-1,-1, 0), // bottom left
+ v3s16( 1,-1, 0), // bottom right
+ v3s16( 0,-1, 1), // bottom back
+ v3s16( 0,-1,-1), // bottom front
+ // 18
+ v3s16(-1, 1, 1), // top back-left
+ v3s16( 1, 1, 1), // top back-right
+ v3s16(-1, 1,-1), // top front-left
+ v3s16( 1, 1,-1), // top front-right
+ v3s16(-1,-1, 1), // bottom back-left
+ v3s16( 1,-1, 1), // bottom back-right
+ v3s16(-1,-1,-1), // bottom front-left
+ v3s16( 1,-1,-1), // bottom front-right
+ // 26
+ v3s16(0,0,0),
+};
+
static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */