From 6a8f9135de448d805457e0b1f561c711d760565e Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 25 Nov 2011 15:38:18 +0200 Subject: Store metadata as metadata name in node definition --- src/map.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 7d5bd700d..d27c6da12 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -994,11 +994,10 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n, /* Add intial metadata */ - - NodeMetadata *meta_proto = nodemgr->get(n).initial_metadata; - if(meta_proto) - { - NodeMetadata *meta = meta_proto->clone(m_gamedef); + + std::string metadata_name = nodemgr->get(n).metadata_name; + if(metadata_name != ""){ + NodeMetadata *meta = NodeMetadata::create(metadata_name, m_gamedef); meta->setOwner(player_name); setNodeMetadata(p, meta); } -- cgit v1.2.3