cleanup unused files
[carveJwlIkooP6JGAAIwe30JlM.git] / gameserver.c
index e36e60f704c345030c9189fab49d27ab42046353..a93d705abc32204e2c5218f000f6545dec92c94b 100644 (file)
@@ -11,7 +11,6 @@ volatile sig_atomic_t sig_stop;
 
 #include "gameserver.h" 
 #include "highscores.c"
-#include "servermonitor_server.c"
 #include "vg/vg_opt.h"
 #include "network_common.h"
 #include "gameserver_db.h"
@@ -923,28 +922,6 @@ static u64 seconds_to_server_ticks( double s ){
    return s / 0.01;
 }
 
-static void test_runner( db_request *req ){
-#if 0
-   vg_warn( "RUNNER\n" );
-   char table[DB_TABLE_UID_MAX];
-   if( db_get_highscore_table_name( "sr002-local-mp_mtzero", 
-                                    "Coastal Run", 0, table ) ){
-      if( db_writeusertime( table, 76561198072130043, 232, 1 ) ){
-         vg_success( "Written time\n" );
-         i32 v = db_readusertime( table, 76561198072130043 );
-         vg_success( "Returned time: %u\n", v );
-      }
-   }
-#endif
-}
-
-#define SIDELOAD
-#ifdef SIDELOAD
-#include "gameserver_sideload.h"
-static int bsideload = 0;
-const char *sideload_path = NULL;
-#endif
-
 int main( int argc, char *argv[] ){
    signal( SIGINT, inthandler );
    signal( SIGQUIT, inthandler );
@@ -954,35 +931,11 @@ int main( int argc, char *argv[] ){
    while( vg_argp( argc, argv ) ){
       if( vg_long_opt( "noauth" ) )
          gameserver.auth_mode = eServerModeNoAuthentication;
-
-#ifdef SIDELOAD
-      if( (arg = vg_long_opt_arg( "sideload" )) ){
-         sideload_path = arg;
-         bsideload = 1;
-      }
-#endif
    }
    
    vg_set_mem_quota( 80*1024*1024 );
    vg_alloc_quota();
-
    db_init();
-   db_request *req = db_alloc_request(0);
-   if( req ){
-      req->handler = test_runner;
-      db_send_request(req);
-   }
-
-#ifdef SIDELOAD
-   if( bsideload ){
-      sideload( sideload_path );
-      db_kill();
-      db_free();
-      return 0;
-   }
-#endif
-
-   monitor_start_server(); /* UNIX socket monitor */
 
    /* steamworks init 
     * --------------------------------------------------------------- */
@@ -1033,23 +986,15 @@ int main( int argc, char *argv[] ){
 
    u64 server_ticks = 8000,
        last_record_save = 8000,
-       last_scoreboard_gen = 0,
-       last_monitor_heartbeat = 0;
+       last_scoreboard_gen = 0;
 
    while( !sig_stop ){
-      monitor_event_loop();
       steamworks_event_loop( hsteampipe );
       poll_connections();
 
       usleep(10000);
       server_ticks ++;
 
-      if( server_ticks > 
-            (last_monitor_heartbeat + seconds_to_server_ticks(10.0))){
-         last_monitor_heartbeat = server_ticks;
-         monitor_heartbeat();
-      }
-
       if( db_killed() )
          break;
    }