Order es_DrawType exactly like enum NodeDrawType in nodedef.h (#5946)
authorThomas--S <Thomas--S@users.noreply.github.com>
Sat, 10 Jun 2017 11:24:05 +0000 (13:24 +0200)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 10 Jun 2017 11:24:05 +0000 (13:24 +0200)
This will help to avoid some strange bugs.

src/script/cpp_api/s_node.cpp

index 1ae8f58a511e51f54e4721efd653600975caea82..d1b2723dfa21baad418b91c6a903b72735d90f2d 100644 (file)
@@ -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},
        };