From: Perttu Ahola Date: Thu, 3 Feb 2011 13:59:59 +0000 (+0200) Subject: a little backwards compatibility with coal X-Git-Tag: 0.2.20110731_3~414 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6bb9de3cc63ea2e8a848ffda222a5e66cb7c5f45;p=oweals%2Fminetest.git a little backwards compatibility with coal --- diff --git a/src/mapblock.cpp b/src/mapblock.cpp index b388a82c4..2c06fa82a 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -1676,6 +1676,23 @@ void MapBlock::deSerialize(std::istream &is, u8 version) data[i].param2 = s[i+nodecount*2]; } } + + /* + Translate nodes as specified in the translate_to fields of + node features + */ + for(u32 i=0; id<translate_to = new MapNode(CONTENT_STONE, MINERAL_COAL); - /*f->setAllTextures(irrlicht->getTextureId("coalstone.png")); - f->is_ground_content = true;*/ + //f->translate_to = new MapNode(CONTENT_STONE, MINERAL_COAL); + f->setAllTextures(TextureSpec(irrlicht->getTextureId("coal.png"), + irrlicht->getTextureId("mineral_coal.png"))); + f->is_ground_content = true; i = CONTENT_WOOD; f = &g_content_features[i]; diff --git a/src/mapnode.h b/src/mapnode.h index 4385f9acf..5392e7866 100644 --- a/src/mapnode.h +++ b/src/mapnode.h @@ -638,6 +638,8 @@ struct MapNode } // Translate deprecated stuff + // NOTE: This doesn't get used because MapBlock handles node + // parameters directly MapNode *translate_to = content_features(d).translate_to; if(translate_to) {