1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

changed node metadata format to better accomodate future needs and problems

This commit is contained in:
Perttu Ahola 2011-04-05 00:24:47 +03:00
parent 042834b09d
commit 389fe31ace
12 changed files with 192 additions and 46 deletions

View file

@ -5192,14 +5192,14 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
{
DSTACK(__FUNCTION_NAME);
// Block file is map/sectors/xxxxxxxx/xxxx
std::string fullpath = m_savedir+"/sectors/"+sectordir+"/"+blockfile;
try{
// Block file is map/sectors/xxxxxxxx/xxxx
std::string fullpath = m_savedir+"/sectors/"+sectordir+"/"+blockfile;
std::ifstream is(fullpath.c_str(), std::ios_base::binary);
if(is.good() == false)
throw FileNotGoodException("Cannot open block file");
v3s16 p3d = getBlockPos(sectordir, blockfile);
v2s16 p2d(p3d.X, p3d.Z);
@ -5264,6 +5264,8 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
"(SerializationError). Ignoring. "
"A new one will be generated."
<<std::endl;
// TODO: Backup file; name is in fullpath.
}
}