From 9c497aa71f4678f7a8adcfedd37b73c5391d97ec Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Sat, 10 Jun 2017 13:24:05 +0200 Subject: [PATCH] Order es_DrawType exactly like enum NodeDrawType in nodedef.h (#5946) This will help to avoid some strange bugs. --- src/script/cpp_api/s_node.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp index 1ae8f58a5..d1b2723df 100644 --- a/src/script/cpp_api/s_node.cpp +++ b/src/script/cpp_api/s_node.cpp @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/pointedthing.h" +// Should be ordered exactly like enum NodeDrawType in nodedef.h struct EnumString ScriptApiNode::es_DrawType[] = { {NDT_NORMAL, "normal"}, @@ -34,17 +35,17 @@ struct EnumString ScriptApiNode::es_DrawType[] = {NDT_LIQUID, "liquid"}, {NDT_FLOWINGLIQUID, "flowingliquid"}, {NDT_GLASSLIKE, "glasslike"}, - {NDT_GLASSLIKE_FRAMED, "glasslike_framed"}, - {NDT_GLASSLIKE_FRAMED_OPTIONAL, "glasslike_framed_optional"}, {NDT_ALLFACES, "allfaces"}, {NDT_ALLFACES_OPTIONAL, "allfaces_optional"}, {NDT_TORCHLIKE, "torchlike"}, {NDT_SIGNLIKE, "signlike"}, {NDT_PLANTLIKE, "plantlike"}, - {NDT_FIRELIKE, "firelike"}, {NDT_FENCELIKE, "fencelike"}, {NDT_RAILLIKE, "raillike"}, {NDT_NODEBOX, "nodebox"}, + {NDT_GLASSLIKE_FRAMED, "glasslike_framed"}, + {NDT_FIRELIKE, "firelike"}, + {NDT_GLASSLIKE_FRAMED_OPTIONAL, "glasslike_framed_optional"}, {NDT_MESH, "mesh"}, {0, NULL}, };