From: Perttu Ahola Date: Fri, 25 Nov 2011 20:45:55 +0000 (+0200) Subject: Modify CONTENT_AIR and CONTENT_IGNORE handling in nodedef.cpp X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=1f53ca5f4c2736ab060d93885d9bd956f14ae430;p=zefram%2Fminetest%2Fminetest_engine.git Modify CONTENT_AIR and CONTENT_IGNORE handling in nodedef.cpp --- diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 52d9fc8b..7855ffef 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -330,7 +330,10 @@ public: f.diggable = false; f.buildable_to = true; f.air_equivalent = true; - set(CONTENT_AIR, f); + // Insert directly into containers + content_t c = CONTENT_AIR; + m_content_features[c] = f; + m_name_id_mapping.set(c, f.name); } // Set CONTENT_IGNORE { @@ -346,7 +349,10 @@ public: // A way to remove accidental CONTENT_IGNOREs f.buildable_to = true; f.air_equivalent = true; - set(CONTENT_IGNORE, f); + // Insert directly into containers + content_t c = CONTENT_IGNORE; + m_content_features[c] = f; + m_name_id_mapping.set(c, f.name); } } // CONTENT_IGNORE = not found @@ -415,6 +421,12 @@ public: infostream<<"registerNode: registering content id \""<