]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/servermain.cpp
Modified windows build parameters a bit to make it build
[dragonfireclient.git] / src / servermain.cpp
index d5be5b8acebe0ad355c75d0bc1408334e533ccd3..254b1f28aade159080df0d2f6eaa26d6e037e2c6 100644 (file)
@@ -68,6 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "porting.h"
 #include "materials.h"
 #include "config.h"
+#include "mineral.h"
 
 /*
        Settings.
@@ -78,6 +79,9 @@ Settings g_settings;
 
 extern void set_default_settings();
 
+// A dummy thing
+ITextureSource *g_texturesource = NULL;
+
 /*
        Debug streams
 */
@@ -94,7 +98,6 @@ std::ostream *derr_server_ptr = &dstream;
 std::ostream *dout_client_ptr = &dstream;
 std::ostream *derr_client_ptr = &dstream;
 
-
 /*
        gettime.h implementation
 */
@@ -125,6 +128,9 @@ int main(int argc, char *argv[])
 
        DSTACK(__FUNCTION_NAME);
 
+       porting::signal_handler_init();
+       bool &kill = *porting::signal_handler_killstatus();
+       
        porting::initializePaths();
 
        initializeMaterialProperties();
@@ -247,6 +253,11 @@ int main(int argc, char *argv[])
        srand(time(0));
        mysrand(time(0));
 
+       // Initialize stuff
+       
+       init_mapnode();
+       init_mineral();
+
        /*
                Run unit tests
        */
@@ -255,18 +266,6 @@ int main(int argc, char *argv[])
        {
                run_tests();
        }
-       
-       // Read map parameters from settings
-
-       HMParams hm_params;
-       /*hm_params.blocksize = g_settings.getU16("heightmap_blocksize");
-       hm_params.randmax = g_settings.get("height_randmax");
-       hm_params.randfactor = g_settings.get("height_randfactor");
-       hm_params.base = g_settings.get("height_base");*/
-
-       MapParams map_params;
-       map_params.plants_amount = g_settings.getFloat("plants_amount");
-       map_params.ravines_amount = g_settings.getFloat("ravines_amount");
 
        /*
                Check parameters
@@ -309,11 +308,11 @@ int main(int argc, char *argv[])
                map_dir = g_settings.get("map-dir");
        
        // Create server
-       Server server(map_dir.c_str(), hm_params, map_params);
+       Server server(map_dir.c_str());
        server.start(port);
-       
+
        // Run server
-       dedicated_server_loop(server);
+       dedicated_server_loop(server, kill);
        
        } //try
        catch(con::PeerNotFoundException &e)