summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Bindings.cpp20
-rw-r--r--source/BlockID.h20
-rw-r--r--source/Blocks/BlockRail.h102
-rw-r--r--source/Entities/Minecart.cpp20
4 files changed, 81 insertions, 81 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index d89592bcf..fbc25ed1c 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -28302,16 +28302,16 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_META_SNOW_LAYER_SIX",E_META_SNOW_LAYER_SIX);
tolua_constant(tolua_S,"E_META_SNOW_LAYER_SEVEN",E_META_SNOW_LAYER_SEVEN);
tolua_constant(tolua_S,"E_META_SNOW_LAYER_EIGHT",E_META_SNOW_LAYER_EIGHT);
- tolua_constant(tolua_S,"E_RAIL_ZM_ZP",E_RAIL_ZM_ZP);
- tolua_constant(tolua_S,"E_RAIL_XM_XP",E_RAIL_XM_XP);
- tolua_constant(tolua_S,"E_RAIL_ASCEND_XP",E_RAIL_ASCEND_XP);
- tolua_constant(tolua_S,"E_RAIL_ASCEND_XM",E_RAIL_ASCEND_XM);
- tolua_constant(tolua_S,"E_RAIL_ASCEND_ZM",E_RAIL_ASCEND_ZM);
- tolua_constant(tolua_S,"E_RAIL_ASCEND_ZP",E_RAIL_ASCEND_ZP);
- tolua_constant(tolua_S,"E_RAIL_CURVED_ZP_XP",E_RAIL_CURVED_ZP_XP);
- tolua_constant(tolua_S,"E_RAIL_CURVED_ZP_XM",E_RAIL_CURVED_ZP_XM);
- tolua_constant(tolua_S,"E_RAIL_CURVED_ZM_XM",E_RAIL_CURVED_ZM_XM);
- tolua_constant(tolua_S,"E_RAIL_CURVED_ZM_XP",E_RAIL_CURVED_ZM_XP);
+ tolua_constant(tolua_S,"E_META_RAIL_ZM_ZP",E_META_RAIL_ZM_ZP);
+ tolua_constant(tolua_S,"E_META_RAIL_XM_XP",E_META_RAIL_XM_XP);
+ tolua_constant(tolua_S,"E_META_RAIL_ASCEND_XP",E_META_RAIL_ASCEND_XP);
+ tolua_constant(tolua_S,"E_META_RAIL_ASCEND_XM",E_META_RAIL_ASCEND_XM);
+ tolua_constant(tolua_S,"E_META_RAIL_ASCEND_ZM",E_META_RAIL_ASCEND_ZM);
+ tolua_constant(tolua_S,"E_META_RAIL_ASCEND_ZP",E_META_RAIL_ASCEND_ZP);
+ tolua_constant(tolua_S,"E_META_RAIL_CURVED_ZP_XP",E_META_RAIL_CURVED_ZP_XP);
+ tolua_constant(tolua_S,"E_META_RAIL_CURVED_ZP_XM",E_META_RAIL_CURVED_ZP_XM);
+ tolua_constant(tolua_S,"E_META_RAIL_CURVED_ZM_XM",E_META_RAIL_CURVED_ZM_XM);
+ tolua_constant(tolua_S,"E_META_RAIL_CURVED_ZM_XP",E_META_RAIL_CURVED_ZM_XP);
tolua_constant(tolua_S,"E_META_COAL_NORMAL",E_META_COAL_NORMAL);
tolua_constant(tolua_S,"E_META_COAL_CHARCOAL",E_META_COAL_CHARCOAL);
tolua_constant(tolua_S,"E_META_DYE_BLACK",E_META_DYE_BLACK);
diff --git a/source/BlockID.h b/source/BlockID.h
index 02d2c7193..40da3c651 100644
--- a/source/BlockID.h
+++ b/source/BlockID.h
@@ -561,16 +561,16 @@ enum
E_META_SNOW_LAYER_EIGHT = 7,
// E_BLOCK_RAIL metas
- E_RAIL_ZM_ZP = 0,
- E_RAIL_XM_XP = 1,
- E_RAIL_ASCEND_XP = 2,
- E_RAIL_ASCEND_XM = 3,
- E_RAIL_ASCEND_ZM = 4,
- E_RAIL_ASCEND_ZP = 5,
- E_RAIL_CURVED_ZP_XP = 6,
- E_RAIL_CURVED_ZP_XM = 7,
- E_RAIL_CURVED_ZM_XM = 8,
- E_RAIL_CURVED_ZM_XP = 9,
+ E_META_RAIL_ZM_ZP = 0,
+ E_META_RAIL_XM_XP = 1,
+ E_META_RAIL_ASCEND_XP = 2,
+ E_META_RAIL_ASCEND_XM = 3,
+ E_META_RAIL_ASCEND_ZM = 4,
+ E_META_RAIL_ASCEND_ZP = 5,
+ E_META_RAIL_CURVED_ZP_XP = 6,
+ E_META_RAIL_CURVED_ZP_XM = 7,
+ E_META_RAIL_CURVED_ZM_XM = 8,
+ E_META_RAIL_CURVED_ZM_XP = 9,
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Item metas:
diff --git a/source/Blocks/BlockRail.h b/source/Blocks/BlockRail.h
index d30063f9e..0e83b952d 100644
--- a/source/Blocks/BlockRail.h
+++ b/source/Blocks/BlockRail.h
@@ -65,13 +65,13 @@ public:
NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ);
switch (Meta)
{
- case E_RAIL_ASCEND_XP:
- case E_RAIL_ASCEND_XM:
- case E_RAIL_ASCEND_ZM:
- case E_RAIL_ASCEND_ZP:
+ case E_META_RAIL_ASCEND_XP:
+ case E_META_RAIL_ASCEND_XM:
+ case E_META_RAIL_ASCEND_ZM:
+ case E_META_RAIL_ASCEND_ZP:
{
// Mapping between the meta and the neighbors that need checking
- Meta -= E_RAIL_ASCEND_XP; // Base index at zero
+ Meta -= E_META_RAIL_ASCEND_XP; // Base index at zero
static const struct
{
int x, z;
@@ -126,12 +126,12 @@ public:
}
if (RailsCnt == 1)
{
- if (Neighbors[7]) return E_RAIL_ASCEND_ZP;
- else if (Neighbors[6]) return E_RAIL_ASCEND_ZM;
- else if (Neighbors[5]) return E_RAIL_ASCEND_XM;
- else if (Neighbors[4]) return E_RAIL_ASCEND_XP;
- else if (Neighbors[0] || Neighbors[1]) return E_RAIL_XM_XP;
- else if (Neighbors[2] || Neighbors[3]) return E_RAIL_ZM_ZP;
+ if (Neighbors[7]) return E_META_RAIL_ASCEND_ZP;
+ else if (Neighbors[6]) return E_META_RAIL_ASCEND_ZM;
+ else if (Neighbors[5]) return E_META_RAIL_ASCEND_XM;
+ else if (Neighbors[4]) return E_META_RAIL_ASCEND_XP;
+ else if (Neighbors[0] || Neighbors[1]) return E_META_RAIL_XM_XP;
+ else if (Neighbors[2] || Neighbors[3]) return E_META_RAIL_ZM_ZP;
ASSERT(!"Weird neighbor count");
return Meta;
}
@@ -144,16 +144,16 @@ public:
}
if (RailsCnt > 1)
{
- if (Neighbors[3] && Neighbors[0]) return E_RAIL_CURVED_ZP_XP;
- else if (Neighbors[3] && Neighbors[1]) return E_RAIL_CURVED_ZP_XM;
- else if (Neighbors[2] && Neighbors[0]) return E_RAIL_CURVED_ZM_XP;
- else if (Neighbors[2] && Neighbors[1]) return E_RAIL_CURVED_ZM_XM;
- else if (Neighbors[7] && Neighbors[2]) return E_RAIL_ASCEND_ZP;
- else if (Neighbors[3] && Neighbors[6]) return E_RAIL_ASCEND_ZM;
- else if (Neighbors[5] && Neighbors[0]) return E_RAIL_ASCEND_XM;
- else if (Neighbors[4] && Neighbors[1]) return E_RAIL_ASCEND_XP;
- else if (Neighbors[0] && Neighbors[1]) return E_RAIL_XM_XP;
- else if (Neighbors[2] && Neighbors[3]) return E_RAIL_ZM_ZP;
+ if (Neighbors[3] && Neighbors[0]) return E_META_RAIL_CURVED_ZP_XP;
+ else if (Neighbors[3] && Neighbors[1]) return E_META_RAIL_CURVED_ZP_XM;
+ else if (Neighbors[2] && Neighbors[0]) return E_META_RAIL_CURVED_ZM_XP;
+ else if (Neighbors[2] && Neighbors[1]) return E_META_RAIL_CURVED_ZM_XM;
+ else if (Neighbors[7] && Neighbors[2]) return E_META_RAIL_ASCEND_ZP;
+ else if (Neighbors[3] && Neighbors[6]) return E_META_RAIL_ASCEND_ZM;
+ else if (Neighbors[5] && Neighbors[0]) return E_META_RAIL_ASCEND_XM;
+ else if (Neighbors[4] && Neighbors[1]) return E_META_RAIL_ASCEND_XP;
+ else if (Neighbors[0] && Neighbors[1]) return E_META_RAIL_XM_XP;
+ else if (Neighbors[2] && Neighbors[3]) return E_META_RAIL_ZM_ZP;
ASSERT(!"Weird neighbor count");
}
return Meta;
@@ -169,7 +169,7 @@ public:
NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
switch (Meta)
{
- case E_RAIL_ZM_ZP:
+ case E_META_RAIL_ZM_ZP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH, E_PURE_DOWN) ||
@@ -181,7 +181,7 @@ public:
break;
}
- case E_RAIL_XM_XP:
+ case E_META_RAIL_XM_XP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_EAST, E_PURE_DOWN) ||
@@ -193,7 +193,7 @@ public:
break;
}
- case E_RAIL_ASCEND_XP:
+ case E_META_RAIL_ASCEND_XP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY + 1, a_BlockZ, BLOCK_FACE_EAST) ||
@@ -205,7 +205,7 @@ public:
break;
}
- case E_RAIL_ASCEND_XM:
+ case E_META_RAIL_ASCEND_XM:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_EAST) ||
@@ -217,7 +217,7 @@ public:
break;
}
- case E_RAIL_ASCEND_ZM:
+ case E_META_RAIL_ASCEND_ZM:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY + 1, a_BlockZ, BLOCK_FACE_NORTH) ||
@@ -229,7 +229,7 @@ public:
break;
}
- case E_RAIL_ASCEND_ZP:
+ case E_META_RAIL_ASCEND_ZP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
@@ -241,7 +241,7 @@ public:
break;
}
- case E_RAIL_CURVED_ZP_XP:
+ case E_META_RAIL_CURVED_ZP_XP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_SOUTH) ||
@@ -253,7 +253,7 @@ public:
break;
}
- case E_RAIL_CURVED_ZP_XM:
+ case E_META_RAIL_CURVED_ZP_XM:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_SOUTH) ||
@@ -265,7 +265,7 @@ public:
break;
}
- case E_RAIL_CURVED_ZM_XM:
+ case E_META_RAIL_CURVED_ZM_XM:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
@@ -277,7 +277,7 @@ public:
break;
}
- case E_RAIL_CURVED_ZM_XP:
+ case E_META_RAIL_CURVED_ZM_XP:
{
if (
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
@@ -325,11 +325,11 @@ public:
case BLOCK_FACE_NORTH:
{
if (
- (Meta == E_RAIL_ZM_ZP) ||
- (Meta == E_RAIL_ASCEND_ZM) ||
- (Meta == E_RAIL_ASCEND_ZP) ||
- (Meta == E_RAIL_CURVED_ZP_XP) ||
- (Meta == E_RAIL_CURVED_ZP_XM)
+ (Meta == E_META_RAIL_ZM_ZP) ||
+ (Meta == E_META_RAIL_ASCEND_ZM) ||
+ (Meta == E_META_RAIL_ASCEND_ZP) ||
+ (Meta == E_META_RAIL_CURVED_ZP_XP) ||
+ (Meta == E_META_RAIL_CURVED_ZP_XM)
)
{
return false;
@@ -340,11 +340,11 @@ public:
case BLOCK_FACE_SOUTH:
{
if (
- (Meta == E_RAIL_ZM_ZP) ||
- (Meta == E_RAIL_ASCEND_ZM) ||
- (Meta == E_RAIL_ASCEND_ZP) ||
- (Meta == E_RAIL_CURVED_ZM_XP) ||
- (Meta == E_RAIL_CURVED_ZM_XM)
+ (Meta == E_META_RAIL_ZM_ZP) ||
+ (Meta == E_META_RAIL_ASCEND_ZM) ||
+ (Meta == E_META_RAIL_ASCEND_ZP) ||
+ (Meta == E_META_RAIL_CURVED_ZM_XP) ||
+ (Meta == E_META_RAIL_CURVED_ZM_XM)
)
{
return false;
@@ -355,11 +355,11 @@ public:
case BLOCK_FACE_EAST:
{
if (
- (Meta == E_RAIL_XM_XP) ||
- (Meta == E_RAIL_ASCEND_XP) ||
- (Meta == E_RAIL_ASCEND_XM) ||
- (Meta == E_RAIL_CURVED_ZP_XM) ||
- (Meta == E_RAIL_CURVED_ZM_XM)
+ (Meta == E_META_RAIL_XM_XP) ||
+ (Meta == E_META_RAIL_ASCEND_XP) ||
+ (Meta == E_META_RAIL_ASCEND_XM) ||
+ (Meta == E_META_RAIL_CURVED_ZP_XM) ||
+ (Meta == E_META_RAIL_CURVED_ZM_XM)
)
{
return false;
@@ -369,11 +369,11 @@ public:
case BLOCK_FACE_WEST:
{
if (
- (Meta == E_RAIL_XM_XP) ||
- (Meta == E_RAIL_ASCEND_XP) ||
- (Meta == E_RAIL_ASCEND_XM) ||
- (Meta == E_RAIL_CURVED_ZP_XP) ||
- (Meta == E_RAIL_CURVED_ZM_XP)
+ (Meta == E_META_RAIL_XM_XP) ||
+ (Meta == E_META_RAIL_ASCEND_XP) ||
+ (Meta == E_META_RAIL_ASCEND_XM) ||
+ (Meta == E_META_RAIL_CURVED_ZP_XP) ||
+ (Meta == E_META_RAIL_CURVED_ZM_XP)
)
{
return false;
diff --git a/source/Entities/Minecart.cpp b/source/Entities/Minecart.cpp
index 685067e79..0c0b7b58a 100644
--- a/source/Entities/Minecart.cpp
+++ b/source/Entities/Minecart.cpp
@@ -99,7 +99,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
switch (BelowMeta)
{
- case E_RAIL_ZM_ZP: // NORTHSOUTH
+ case E_META_RAIL_ZM_ZP: // NORTHSOUTH
{
SetRotation(270);
SpeedY = 0; // Don't move vertically as on ground
@@ -124,7 +124,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_XM_XP: // EASTWEST
+ case E_META_RAIL_XM_XP: // EASTWEST
{
SetRotation(180);
SpeedY = 0;
@@ -146,7 +146,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_ASCEND_ZM: // ASCEND NORTH
+ case E_META_RAIL_ASCEND_ZM: // ASCEND NORTH
{
SetRotation(270);
SetPosY(floor(GetPosY()) + 0.2); // It seems it doesn't work without levitation :/
@@ -175,7 +175,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_ASCEND_ZP: // ASCEND SOUTH
+ case E_META_RAIL_ASCEND_ZP: // ASCEND SOUTH
{
SetRotation(270);
SetPosY(floor(GetPosY()) + 0.2);
@@ -204,7 +204,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_ASCEND_XM: // ASCEND EAST
+ case E_META_RAIL_ASCEND_XM: // ASCEND EAST
{
SetRotation(180);
SetPosY(floor(GetPosY()) + 0.2);
@@ -231,7 +231,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_ASCEND_XP: // ASCEND WEST
+ case E_META_RAIL_ASCEND_XP: // ASCEND WEST
{
SetRotation(180);
SetPosY(floor(GetPosY()) + 0.2);
@@ -258,7 +258,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_CURVED_ZM_XM: // Ends pointing NORTH and WEST
+ case E_META_RAIL_CURVED_ZM_XM: // Ends pointing NORTH and WEST
{
SetRotation(315); // Set correct rotation server side
SetPosY(floor(GetPosY()) + 0.2); // Levitate dat cart
@@ -274,7 +274,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_CURVED_ZM_XP: // Curved NORTH EAST
+ case E_META_RAIL_CURVED_ZM_XP: // Curved NORTH EAST
{
SetRotation(225);
SetPosY(floor(GetPosY()) + 0.2);
@@ -290,7 +290,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_CURVED_ZP_XM: // Curved SOUTH WEST
+ case E_META_RAIL_CURVED_ZP_XM: // Curved SOUTH WEST
{
SetRotation(135);
SetPosY(floor(GetPosY()) + 0.2);
@@ -306,7 +306,7 @@ void cMinecart::HandleRailPhysics(float a_Dt, cChunk & a_Chunk)
break;
}
- case E_RAIL_CURVED_ZP_XP: // Curved SOUTH EAST
+ case E_META_RAIL_CURVED_ZP_XP: // Curved SOUTH EAST
{
SetRotation(45);
SetPosY(floor(GetPosY()) + 0.2);