mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 23:22:24 +01:00
some tinkering with gui. removed updating of configuration file at end
This commit is contained in:
parent
5a36956f75
commit
6350c5d7a6
Binary file not shown.
@ -62,6 +62,8 @@
|
|||||||
|
|
||||||
# 20 min/day
|
# 20 min/day
|
||||||
#time_speed = 72
|
#time_speed = 72
|
||||||
|
# 4 min/day
|
||||||
|
#time_speed = 360
|
||||||
# 1 min/day
|
# 1 min/day
|
||||||
#time_speed = 1440
|
#time_speed = 1440
|
||||||
|
|
||||||
|
@ -55,6 +55,6 @@ void set_default_settings()
|
|||||||
g_settings.setDefault("max_block_send_distance", "5");
|
g_settings.setDefault("max_block_send_distance", "5");
|
||||||
g_settings.setDefault("max_block_generate_distance", "4");
|
g_settings.setDefault("max_block_generate_distance", "4");
|
||||||
g_settings.setDefault("time_send_interval", "20");
|
g_settings.setDefault("time_send_interval", "20");
|
||||||
g_settings.setDefault("time_speed", "144");
|
g_settings.setDefault("time_speed", "360");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2486,10 +2486,10 @@ int main(int argc, char *argv[])
|
|||||||
/*
|
/*
|
||||||
Update configuration file
|
Update configuration file
|
||||||
*/
|
*/
|
||||||
if(configpath != "")
|
/*if(configpath != "")
|
||||||
{
|
{
|
||||||
g_settings.updateConfigFile(configpath.c_str());
|
g_settings.updateConfigFile(configpath.c_str());
|
||||||
}
|
}*/
|
||||||
|
|
||||||
} //try
|
} //try
|
||||||
catch(con::PeerNotFoundException &e)
|
catch(con::PeerNotFoundException &e)
|
||||||
|
62
src/map.cpp
62
src/map.cpp
@ -1141,21 +1141,21 @@ bool Map::dayNightDiffed(v3s16 blockpos)
|
|||||||
}
|
}
|
||||||
catch(InvalidPositionException &e){}
|
catch(InvalidPositionException &e){}
|
||||||
try{
|
try{
|
||||||
v3s16 p = blockpos + v3s16(1,0,0);
|
v3s16 p = blockpos + v3s16(-1,0,0);
|
||||||
MapBlock *b = getBlockNoCreate(p);
|
MapBlock *b = getBlockNoCreate(p);
|
||||||
if(b->dayNightDiffed())
|
if(b->dayNightDiffed())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch(InvalidPositionException &e){}
|
catch(InvalidPositionException &e){}
|
||||||
try{
|
try{
|
||||||
v3s16 p = blockpos + v3s16(0,1,0);
|
v3s16 p = blockpos + v3s16(0,-1,0);
|
||||||
MapBlock *b = getBlockNoCreate(p);
|
MapBlock *b = getBlockNoCreate(p);
|
||||||
if(b->dayNightDiffed())
|
if(b->dayNightDiffed())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch(InvalidPositionException &e){}
|
catch(InvalidPositionException &e){}
|
||||||
try{
|
try{
|
||||||
v3s16 p = blockpos + v3s16(0,0,1);
|
v3s16 p = blockpos + v3s16(0,0,-1);
|
||||||
MapBlock *b = getBlockNoCreate(p);
|
MapBlock *b = getBlockNoCreate(p);
|
||||||
if(b->dayNightDiffed())
|
if(b->dayNightDiffed())
|
||||||
return true;
|
return true;
|
||||||
@ -1805,26 +1805,6 @@ MapBlock * ServerMap::emergeBlock(
|
|||||||
Calculate material
|
Calculate material
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// If node is very low
|
|
||||||
/*if(real_y <= surface_y - 7)
|
|
||||||
{
|
|
||||||
// Create dungeons
|
|
||||||
if(underground_emptiness[
|
|
||||||
ued*ued*(z0*ued/MAP_BLOCKSIZE)
|
|
||||||
+ued*(y0*ued/MAP_BLOCKSIZE)
|
|
||||||
+(x0*ued/MAP_BLOCKSIZE)])
|
|
||||||
{
|
|
||||||
n.d = CONTENT_AIR;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
n.d = CONTENT_STONE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If node is under surface level
|
|
||||||
else if(real_y <= surface_y - surface_depth)
|
|
||||||
n.d = CONTENT_STONE;
|
|
||||||
*/
|
|
||||||
if(real_y <= surface_y - surface_depth)
|
if(real_y <= surface_y - surface_depth)
|
||||||
{
|
{
|
||||||
// Create dungeons
|
// Create dungeons
|
||||||
@ -1955,42 +1935,6 @@ MapBlock * ServerMap::emergeBlock(
|
|||||||
*/
|
*/
|
||||||
sector->insertBlock(block);
|
sector->insertBlock(block);
|
||||||
|
|
||||||
/*
|
|
||||||
Do some interpolation for dungeons
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
TimeTaker timer("interpolation", g_device);
|
|
||||||
|
|
||||||
MapVoxelManipulator vmanip(this);
|
|
||||||
|
|
||||||
v3s16 relpos = block->getPosRelative();
|
|
||||||
|
|
||||||
vmanip.interpolate(VoxelArea(relpos-v3s16(1,1,1),
|
|
||||||
relpos+v3s16(1,1,1)*(MAP_BLOCKSIZE+1)));
|
|
||||||
/*vmanip.interpolate(VoxelArea(relpos,
|
|
||||||
relpos+v3s16(1,1,1)*(MAP_BLOCKSIZE-1)));*/
|
|
||||||
|
|
||||||
core::map<v3s16, MapBlock*> modified_blocks;
|
|
||||||
vmanip.blitBack(modified_blocks);
|
|
||||||
dstream<<"blitBack modified "<<modified_blocks.size()
|
|
||||||
<<" blocks"<<std::endl;
|
|
||||||
|
|
||||||
// Add modified blocks to changed_blocks and lighting_invalidated_blocks
|
|
||||||
for(core::map<v3s16, MapBlock*>::Iterator
|
|
||||||
i = modified_blocks.getIterator();
|
|
||||||
i.atEnd() == false; i++)
|
|
||||||
{
|
|
||||||
MapBlock *block = i.getNode()->getValue();
|
|
||||||
|
|
||||||
changed_blocks.insert(block->getPos(), block);
|
|
||||||
//lighting_invalidated_blocks.insert(block->getPos(), block);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sector object stuff
|
Sector object stuff
|
||||||
*/
|
*/
|
||||||
|
@ -387,7 +387,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Takes the blocks at the trailing edges into account
|
Takes the blocks at the leading edges into account
|
||||||
*/
|
*/
|
||||||
bool dayNightDiffed(v3s16 blockpos);
|
bool dayNightDiffed(v3s16 blockpos);
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ public:
|
|||||||
These methods don't care about neighboring blocks.
|
These methods don't care about neighboring blocks.
|
||||||
It means that to know if a block really doesn't need a mesh
|
It means that to know if a block really doesn't need a mesh
|
||||||
update between day and night, the neighboring blocks have
|
update between day and night, the neighboring blocks have
|
||||||
to be taken into account.
|
to be taken into account. Use Map::dayNightDiffed().
|
||||||
*/
|
*/
|
||||||
void updateDayNightDiff();
|
void updateDayNightDiff();
|
||||||
|
|
||||||
|
@ -354,14 +354,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Update configuration file
|
|
||||||
*/
|
|
||||||
if(configpath != "")
|
|
||||||
{
|
|
||||||
g_settings.updateConfigFile(configpath.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
} //try
|
} //try
|
||||||
catch(con::PeerNotFoundException &e)
|
catch(con::PeerNotFoundException &e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user