}
// Format used for writing
- u8 version = SER_FMT_VER_HIGHEST;
+ u8 version = SER_FMT_VER_HIGHEST_WRITE;
// Get destination
v3s16 p3d = block->getPos();
}
// Format used for writing
- u8 version = SER_FMT_VER_HIGHEST;
+ u8 version = SER_FMT_VER_HIGHEST_WRITE;
// Get destination
v3s16 p3d = block->getPos();
}
// Format used for writing
- u8 version = SER_FMT_VER_HIGHEST;
+ u8 version = SER_FMT_VER_HIGHEST_WRITE;
// Get destination
v3s16 p3d = block->getPos();
allowed_options.insert(std::make_pair("gameid", ValueSpec(VALUETYPE_STRING,
_("Set gameid (\"--gameid list\" prints available ones)"))));
#if USE_LEVELDB
- allowed_options.insert("migrate", ValueSpec(VALUETYPE_STRING,
- _("Migrate from current map backend to another")));
+ allowed_options.insert(std::make_pair("migrate", ValueSpec(VALUETYPE_STRING,
+ _("Migrate from current map backend to another"))));
#endif
#ifndef SERVER
allowed_options.insert(std::make_pair("videomodes", ValueSpec(VALUETYPE_FLAG,
return 1;
}
- core::list<v3s16> blocks;
+ std::list<v3s16> blocks;
ServerMap &old_map = ((ServerMap&)server.getMap());
old_map.listAllLoadableBlocks(blocks);
int count = 0;
new_db->beginSave();
- for (core::list<v3s16>::Iterator i = blocks.begin(); i != blocks.end(); ++i) {
+ for (std::list<v3s16>::iterator i = blocks.begin(); i != blocks.end(); ++i) {
MapBlock *block = old_map.loadBlock(*i);
new_db->saveBlock(block);
MapSector *sector = old_map.getSectorNoGenerate(v2s16(i->X, i->Z));
errorstream<<"Map::listAllLoadableBlocks(): Result will be missing "
<<"all blocks that are stored in flat files"<<std::endl;
}
- dbase->listAllLoadableBlocks(dst);
+ core::list<v3s16> dst_;
+ dbase->listAllLoadableBlocks(dst_);
+ for(core::list<v3s16>::Iterator i = dst_.begin(); i != dst_.end(); ++i)
+ dst.push_back(*i);
}
void ServerMap::listAllLoadedBlocks(std::list<v3s16> &dst)
#include "rollback_interface.h" // Needed for rollbackRevertActions()
#include "util/numeric.h"
#include "util/thread.h"
+#include "environment.h"
#include <string>
#include <list>
#include <map>