Skip to content

Commit

Permalink
Decoration, Ore: Resolve node names on Mapgen init
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Jun 17, 2013
1 parent 56093b6 commit 0b20768
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/emerge.cpp
Expand Up @@ -123,9 +123,13 @@ void EmergeManager::initMapgens(MapgenParams *mgparams) {
return;

biomedef->resolveNodeNames(ndef);
for (size_t i = 0; i != ores.size(); i++)
ores[i]->resolveNodeNames(ndef);
for (size_t i = 0; i != decorations.size(); i++)
decorations[i]->resolveNodeNames(ndef);

this->params = mgparams;
for (unsigned int i = 0; i != emergethread.size(); i++) {
for (size_t i = 0; i != emergethread.size(); i++) {
mg = createMapgen(params->mg_name, 0, params);
if (!mg) {
infostream << "EmergeManager: falling back to mapgen v6" << std::endl;
Expand Down
4 changes: 0 additions & 4 deletions src/mapgen.cpp
Expand Up @@ -109,8 +109,6 @@ void Ore::placeOre(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
if (!in_range)
return;

resolveNodeNames(mg->ndef);

int ymin, ymax;
if (in_range & ORE_RANGE_MIRROR) {
ymin = MYMAX(nmin.Y, -height_max);
Expand Down Expand Up @@ -226,8 +224,6 @@ void Decoration::resolveNodeNames(INodeDefManager *ndef) {


void Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
resolveNodeNames(mg->ndef);

PseudoRandom ps(blockseed + 53);
int carea_size = nmax.X - nmin.X + 1;

Expand Down

0 comments on commit 0b20768

Please sign in to comment.