some tinkering with gui. removed updating of configuration file at end
authorPerttu Ahola <celeron55@gmail.com>
Mon, 20 Dec 2010 12:59:21 +0000 (14:59 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 20 Dec 2010 12:59:21 +0000 (14:59 +0200)
data/pauseMenu.gui
minetest.conf.example
src/defaultsettings.cpp
src/main.cpp
src/map.cpp
src/map.h
src/mapblock.h
src/servermain.cpp

index 78fa02a9a61656cbd04cad83c7770c29263dfc2d..543b3fb8a3b7db03f6bf08d9d945570608c23db2 100644 (file)
Binary files a/data/pauseMenu.gui and b/data/pauseMenu.gui differ
index 20392e56d6270a0ab99dabedff394a80d7ea31a9..ed3f8ebefbf7414a4544300675290a91850d717b 100644 (file)
@@ -62,6 +62,8 @@
 
 # 20 min/day
 #time_speed = 72
+# 4 min/day
+#time_speed = 360
 # 1 min/day
 #time_speed = 1440
 
index 2dbbaada73da28558ba0f8b9d1fdebe9475d622b..a9b8dc279be24b5661830449264a8bf37f6522f5 100644 (file)
@@ -55,6 +55,6 @@ void set_default_settings()
        g_settings.setDefault("max_block_send_distance", "5");
        g_settings.setDefault("max_block_generate_distance", "4");
        g_settings.setDefault("time_send_interval", "20");
-       g_settings.setDefault("time_speed", "144");
+       g_settings.setDefault("time_speed", "360");
 }
 
index 7d146835fe8911c931da1f7d609656d0beb0349d..3dc111201af703e883c2eeedbfc70d3db341ae47 100644 (file)
@@ -2486,10 +2486,10 @@ int main(int argc, char *argv[])
        /*\r
                Update configuration file\r
        */\r
-       if(configpath != "")\r
+       /*if(configpath != "")\r
        {\r
                g_settings.updateConfigFile(configpath.c_str());\r
-       }\r
+       }*/\r
 \r
        } //try\r
        catch(con::PeerNotFoundException &e)\r
index db9d4120e0d4f76a5cb4090a734450da79c72c8f..acaebe25743f7b4f7f0f6a789db94652fb99b158 100644 (file)
@@ -1141,21 +1141,21 @@ bool Map::dayNightDiffed(v3s16 blockpos)
        }
        catch(InvalidPositionException &e){}
        try{
-               v3s16 p = blockpos + v3s16(1,0,0);
+               v3s16 p = blockpos + v3s16(-1,0,0);
                MapBlock *b = getBlockNoCreate(p);
                if(b->dayNightDiffed())
                        return true;
        }
        catch(InvalidPositionException &e){}
        try{
-               v3s16 p = blockpos + v3s16(0,1,0);
+               v3s16 p = blockpos + v3s16(0,-1,0);
                MapBlock *b = getBlockNoCreate(p);
                if(b->dayNightDiffed())
                        return true;
        }
        catch(InvalidPositionException &e){}
        try{
-               v3s16 p = blockpos + v3s16(0,0,1);
+               v3s16 p = blockpos + v3s16(0,0,-1);
                MapBlock *b = getBlockNoCreate(p);
                if(b->dayNightDiffed())
                        return true;
@@ -1805,26 +1805,6 @@ MapBlock * ServerMap::emergeBlock(
                                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)
                        {
                                // Create dungeons
@@ -1955,42 +1935,6 @@ MapBlock * ServerMap::emergeBlock(
        */
        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
        */
index 581708a361efc2a0975be1e020bdc57450d6035a..05984b1a90d97b0ddff65c752b732be4400d4c8e 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -387,7 +387,7 @@ public:
 #endif
 
        /*
-               Takes the blocks at the trailing edges into account
+               Takes the blocks at the leading edges into account
        */
        bool dayNightDiffed(v3s16 blockpos);
 
index 304794dd4931e3bfcd13587ad7d473b7725bfe77..2bdf639b7017ee02145bfac5a452eba21ebf16b0 100644 (file)
@@ -412,7 +412,7 @@ public:
                These methods don't care about neighboring blocks.
                It means that to know if a block really doesn't need a mesh
                update between day and night, the neighboring blocks have
-               to be taken into account.
+               to be taken into account. Use Map::dayNightDiffed().
        */
        void updateDayNightDiff();
 
index 5edc8ac7c0794c16c1efea2161936572649448bc..70f11cba3ac6006f765f801b6132c03a90880704 100644 (file)
@@ -354,14 +354,6 @@ int main(int argc, char *argv[])
                }
        }
 
-       /*
-               Update configuration file
-       */
-       if(configpath != "")
-       {
-               g_settings.updateConfigFile(configpath.c_str());
-       }
-
        } //try
        catch(con::PeerNotFoundException &e)
        {