#include "porting.h"
#include "materials.h"
#include "config.h"
+#include "mineral.h"
/*
Settings.
extern void set_default_settings();
+// A dummy thing
+ITextureSource *g_texturesource = NULL;
+
/*
Debug streams
*/
std::ostream *dout_client_ptr = &dstream;
std::ostream *derr_client_ptr = &dstream;
-
/*
gettime.h implementation
*/
DSTACK(__FUNCTION_NAME);
+ porting::signal_handler_init();
+ bool &kill = *porting::signal_handler_killstatus();
+
porting::initializePaths();
initializeMaterialProperties();
srand(time(0));
mysrand(time(0));
+ // Initialize stuff
+
+ init_mapnode();
+ init_mineral();
+
/*
Run unit tests
*/
{
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
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)