mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Ctrl+C handling on POSIX, some commands for server and other tweaking
This commit is contained in:
@@ -98,7 +98,6 @@ std::ostream *derr_server_ptr = &dstream;
|
||||
std::ostream *dout_client_ptr = &dstream;
|
||||
std::ostream *derr_client_ptr = &dstream;
|
||||
|
||||
|
||||
/*
|
||||
gettime.h implementation
|
||||
*/
|
||||
@@ -129,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();
|
||||
@@ -251,6 +253,11 @@ int main(int argc, char *argv[])
|
||||
srand(time(0));
|
||||
mysrand(time(0));
|
||||
|
||||
// Initialize stuff
|
||||
|
||||
init_mapnode();
|
||||
init_mineral();
|
||||
|
||||
/*
|
||||
Run unit tests
|
||||
*/
|
||||
@@ -260,11 +267,6 @@ int main(int argc, char *argv[])
|
||||
run_tests();
|
||||
}
|
||||
|
||||
// Initialize stuff
|
||||
|
||||
init_mapnode();
|
||||
init_mineral();
|
||||
|
||||
/*
|
||||
Check parameters
|
||||
*/
|
||||
@@ -308,9 +310,9 @@ int main(int argc, char *argv[])
|
||||
// Create server
|
||||
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)
|
||||
|
Reference in New Issue
Block a user