From c6fd2986d4261cf742d3bc21e8c12be59ab89f95 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 14 Nov 2011 21:41:30 +0200 Subject: GameDef compiles --- src/mapgen.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mapgen.cpp') diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 8fc568f36..2b8050260 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mineral.h" //#include "serverobject.h" #include "content_sao.h" -#include "mapnode_contentfeatures.h" +#include "nodedef.h" namespace mapgen { @@ -1417,9 +1417,9 @@ void add_random_objects(MapBlock *block) MapNode n = block->getNodeNoEx(p); if(n.getContent() == CONTENT_IGNORE) continue; - if(content_features(n).liquid_type != LIQUID_NONE) + if(data->nodemgr->get(n)->liquid_type != LIQUID_NONE) continue; - if(content_features(n).walkable) + if(data->nodemgr->get(n)->walkable) { last_node_walkable = true; continue; @@ -1478,6 +1478,9 @@ void make_block(BlockMakeData *data) return; } + assert(data->vmanip); + assert(data->nodemgr); + v3s16 blockpos = data->blockpos; /*dstream<<"makeBlock(): ("<vmanip->m_area.index(p); MapNode *n = &data->vmanip->m_data[i]; - if(content_features(*n).is_ground_content + if(data->nodemgr->get(*n).is_ground_content || n->getContent() == CONTENT_JUNGLETREE) { found = true; @@ -2284,7 +2287,8 @@ void make_block(BlockMakeData *data) BlockMakeData::BlockMakeData(): no_op(false), vmanip(NULL), - seed(0) + seed(0), + nodemgr(NULL) {} BlockMakeData::~BlockMakeData() -- cgit v1.2.3