diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/heretic/d_main.c | 15 | ||||
-rw-r--r-- | src/heretic/d_net.c | 23 |
2 files changed, 23 insertions, 15 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index d1c74b7c..f37adcec 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -88,6 +88,7 @@ FILE *debugfile; static int show_endoom = 1; +void D_ConnectNetGame(void); void D_CheckNetGame(void); void D_PageDrawer(void); void D_AdvanceDemo(void); @@ -945,6 +946,14 @@ void D_DoomMain(void) testcontrols = true; } +#ifdef FEATURE_MULTIPLAYER + tprintf("NET_Init: Init network subsystem.\n", 1); + NET_Init (); +#endif + + I_InitTimer(); + D_ConnectNetGame(); + // haleyjd: removed WATCOMC initStartup(); @@ -971,11 +980,6 @@ void D_DoomMain(void) tprintf(DEH_String("MN_Init: Init menu system.\n"), 1); MN_Init(); -#ifdef FEATURE_MULTIPLAYER - tprintf ("NET_Init: Init network subsystem.\n", 1); - NET_Init (); -#endif - CT_Init(); tprintf(DEH_String("R_Init: Init Heretic refresh daemon."), 1); @@ -990,7 +994,6 @@ void D_DoomMain(void) tprintf(DEH_String("I_Init: Setting up machine state.\n"), 1); I_CheckIsScreensaver(); - I_InitTimer(); I_InitJoystick(); IncThermo(); diff --git a/src/heretic/d_net.c b/src/heretic/d_net.c index 54b0c14d..7218eec9 100644 --- a/src/heretic/d_net.c +++ b/src/heretic/d_net.c @@ -176,17 +176,9 @@ static void InitConnectData(net_connect_data_t *connect_data) connect_data->is_freedoom = 0; } -// -// D_CheckNetGame -// Works out player numbers among the net participants -// - -void D_CheckNetGame (void) +void D_ConnectNetGame(void) { net_connect_data_t connect_data; - net_gamesettings_t settings; - - D_RegisterLoopCallbacks(&doom_loop_interface); InitConnectData(&connect_data); netgame = D_InitNetGame(&connect_data); @@ -203,6 +195,18 @@ void D_CheckNetGame (void) { netgame = true; } +} + +// +// D_CheckNetGame +// Works out player numbers among the net participants +// + +void D_CheckNetGame (void) +{ + net_gamesettings_t settings; + + D_RegisterLoopCallbacks(&doom_loop_interface); if (netgame) { @@ -213,3 +217,4 @@ void D_CheckNetGame (void) D_StartNetGame(&settings); LoadGameSettings(&settings); } + |