aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp160
1 files changed, 0 insertions, 160 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 6a7cadca5..aff545921 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -530,23 +530,6 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
u32 liquid_loop_max = g_settings->getS32("liquid_loop_max");
u32 loop_max = liquid_loop_max;
-#if 0
-
- /* If liquid_loop_max is not keeping up with the queue size increase
- * loop_max up to a maximum of liquid_loop_max * dedicated_server_step.
- */
- if (m_transforming_liquid.size() > loop_max * 2) {
- // "Burst" mode
- float server_step = g_settings->getFloat("dedicated_server_step");
- if (m_transforming_liquid_loop_count_multiplier - 1.0 < server_step)
- m_transforming_liquid_loop_count_multiplier *= 1.0 + server_step / 10;
- } else {
- m_transforming_liquid_loop_count_multiplier = 1.0;
- }
-
- loop_max *= m_transforming_liquid_loop_count_multiplier;
-#endif
-
while (m_transforming_liquid.size() != 0)
{
// This should be done here so that it is done when continue is used
@@ -1302,18 +1285,6 @@ ServerMap::~ServerMap()
*/
delete dbase;
delete dbase_ro;
-
-#if 0
- /*
- Free all MapChunks
- */
- core::map<v2s16, MapChunk*>::Iterator i = m_chunks.getIterator();
- for(; i.atEnd() == false; i++)
- {
- MapChunk *chunk = i.getNode()->getValue();
- delete chunk;
- }
-#endif
}
MapgenParams *ServerMap::getMapgenParams()
@@ -1402,25 +1373,6 @@ bool ServerMap::initBlockMake(v3s16 blockpos, BlockMakeData *data)
data->vmanip = new MMVManip(this);
data->vmanip->initialEmerge(full_bpmin, full_bpmax);
- // Note: we may need this again at some point.
-#if 0
- // Ensure none of the blocks to be generated were marked as
- // containing CONTENT_IGNORE
- for (s16 z = blockpos_min.Z; z <= blockpos_max.Z; z++) {
- for (s16 y = blockpos_min.Y; y <= blockpos_max.Y; y++) {
- for (s16 x = blockpos_min.X; x <= blockpos_max.X; x++) {
- core::map<v3s16, u8>::Node *n;
- n = data->vmanip->m_loaded_blocks.find(v3s16(x, y, z));
- if (n == NULL)
- continue;
- u8 flags = n->getValue();
- flags &= ~VMANIP_BLOCK_CONTAINS_CIGNORE;
- n->setValue(flags);
- }
- }
- }
-#endif
-
// Data is ready now.
return true;
}
@@ -1431,8 +1383,6 @@ void ServerMap::finishBlockMake(BlockMakeData *data,
v3s16 bpmin = data->blockpos_min;
v3s16 bpmax = data->blockpos_max;
- v3s16 extra_borders(1, 1, 1);
-
bool enable_mapgen_debug_info = m_emerge->enable_mapgen_debug_info;
EMERGE_DBG_OUT("finishBlockMake(): " PP(bpmin) " - " PP(bpmax));
@@ -1525,116 +1475,6 @@ MapSector *ServerMap::createSector(v2s16 p2d)
return sector;
}
-#if 0
-/*
- This is a quick-hand function for calling makeBlock().
-*/
-MapBlock * ServerMap::generateBlock(
- v3s16 p,
- std::map<v3s16, MapBlock*> &modified_blocks
-)
-{
- bool enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
-
- TimeTaker timer("generateBlock");
-
- //MapBlock *block = original_dummy;
-
- v2s16 p2d(p.X, p.Z);
- v2s16 p2d_nodes = p2d * MAP_BLOCKSIZE;
-
- /*
- Do not generate over-limit
- */
- if(blockpos_over_limit(p))
- {
- infostream<<FUNCTION_NAME<<": Block position over limit"<<std::endl;
- throw InvalidPositionException("generateBlock(): pos. over limit");
- }
-
- /*
- Create block make data
- */
- BlockMakeData data;
- initBlockMake(&data, p);
-
- /*
- Generate block
- */
- {
- TimeTaker t("mapgen::make_block()");
- mapgen->makeChunk(&data);
- //mapgen::make_block(&data);
-
- if(enable_mapgen_debug_info == false)
- t.stop(true); // Hide output
- }
-
- /*
- Blit data back on map, update lighting, add mobs and whatever this does
- */
- finishBlockMake(&data, modified_blocks);
-
- /*
- Get central block
- */
- MapBlock *block = getBlockNoCreateNoEx(p);
-
-#if 0
- /*
- Check result
- */
- if(block)
- {
- bool erroneus_content = false;
- for(s16 z0=0; z0<MAP_BLOCKSIZE; z0++)
- for(s16 y0=0; y0<MAP_BLOCKSIZE; y0++)
- for(s16 x0=0; x0<MAP_BLOCKSIZE; x0++)
- {
- v3s16 p(x0,y0,z0);
- MapNode n = block->getNode(p);
- if(n.getContent() == CONTENT_IGNORE)
- {
- infostream<<"CONTENT_IGNORE at "
- <<"("<<p.X<<","<<p.Y<<","<<p.Z<<")"
- <<std::endl;
- erroneus_content = true;
- assert(0);
- }
- }
- if(erroneus_content)
- {
- assert(0);
- }
- }
-#endif
-
-#if 0
- /*
- Generate a completely empty block
- */
- if(block)
- {
- for(s16 z0=0; z0<MAP_BLOCKSIZE; z0++)
- for(s16 x0=0; x0<MAP_BLOCKSIZE; x0++)
- {
- for(s16 y0=0; y0<MAP_BLOCKSIZE; y0++)
- {
- MapNode n;
- n.setContent(CONTENT_AIR);
- block->setNode(v3s16(x0,y0,z0), n);
- }
- }
- }
-#endif
-
- if(enable_mapgen_debug_info == false)
- timer.stop(true); // Hide output
-
- return block;
-}
-#endif
-
MapBlock * ServerMap::createBlock(v3s16 p)
{
/*