diff options
author | Simon Howard | 2013-04-05 20:24:20 +0000 |
---|---|---|
committer | Simon Howard | 2013-04-05 20:24:20 +0000 |
commit | d3cd96a9dc73d4b261757a34bf1e3c59b48ddf19 (patch) | |
tree | 1be029f73fef618b296a80818fbdbf54aa9c2c30 | |
parent | d71cfa9e4af661ace3f957162fa14cbdba8bd83c (diff) | |
download | chocolate-doom-d3cd96a9dc73d4b261757a34bf1e3c59b48ddf19.tar.gz chocolate-doom-d3cd96a9dc73d4b261757a34bf1e3c59b48ddf19.tar.bz2 chocolate-doom-d3cd96a9dc73d4b261757a34bf1e3c59b48ddf19.zip |
Use two-stage netgame startup for Heretic.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2584
-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); } + |