From 50d63e4b0ac15ded5a9fb684586a88a91366d067 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 16 Nov 2011 09:36:19 +0200 Subject: Add name field to ContentFeatures --- src/nodedef.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/nodedef.cpp') diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 210e466d2..166d9cba0 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -114,10 +114,10 @@ void ContentFeatures::reset() backface_culling = true; #endif used_texturenames.clear(); - modified = true; // NodeDefManager explicitly sets to false /* Actual data */ + name = ""; drawtype = NDT_NORMAL; visual_scale = 1.0; for(u32 i=0; i<6; i++) @@ -159,6 +159,7 @@ void ContentFeatures::reset() void ContentFeatures::serialize(std::ostream &os) { writeU8(os, 0); // version + os<reset(); // Reset to defaults - f->modified = false; // Not changed from default if(i == CONTENT_IGNORE || i == CONTENT_AIR){ f->drawtype = NDT_AIRLIKE; continue; } f->setAllTextures("unknown_block.png"); - //f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; } #ifndef SERVER // Make CONTENT_IGNORE to not block the view when occlusion culling @@ -361,14 +361,14 @@ public: // Writable virtual void set(content_t c, const ContentFeatures &def) { - infostream<<"registerNode: registering content \""<modified) + if(f->name == "") continue; writeU16(tmp_os, i); f->serialize(tmp_os); @@ -523,7 +523,6 @@ public: } ContentFeatures *f = &m_content_features[i]; f->deSerialize(tmp_is, gamedef); - f->modified = true; } } private: -- cgit v1.2.3