1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

a little backwards compatibility with coal

This commit is contained in:
Perttu Ahola 2011-02-03 15:59:59 +02:00
parent 44ce9018dd
commit 6bb9de3cc6
3 changed files with 23 additions and 3 deletions

View file

@ -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; i<MAP_BLOCKSIZE*MAP_BLOCKSIZE*MAP_BLOCKSIZE; i++)
{
MapNode &n = data[i];
MapNode *translate_to = content_features(n.d).translate_to;
if(translate_to)
{
dstream<<"MapBlock: WARNING: Translating node "<<n.d<<" to "
<<translate_to->d<<std::endl;
n = *translate_to;
}
}
}