summaryrefslogtreecommitdiff
path: root/src/doom/d_net.c
diff options
context:
space:
mode:
authorSimon Howard2013-04-05 20:15:56 +0000
committerSimon Howard2013-04-05 20:15:56 +0000
commitd71cfa9e4af661ace3f957162fa14cbdba8bd83c (patch)
treed7ee9b4635c4d44fe071ca0e99ab720706b7ee14 /src/doom/d_net.c
parent6617f41db080196a0e0844c2fcf6e4f982e161b3 (diff)
downloadchocolate-doom-d71cfa9e4af661ace3f957162fa14cbdba8bd83c.tar.gz
chocolate-doom-d71cfa9e4af661ace3f957162fa14cbdba8bd83c.tar.bz2
chocolate-doom-d71cfa9e4af661ace3f957162fa14cbdba8bd83c.zip
Split Doom netgame startup into two stages.
Subversion-branch: /branches/v2-branch Subversion-revision: 2583
Diffstat (limited to 'src/doom/d_net.c')
-rw-r--r--src/doom/d_net.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/doom/d_net.c b/src/doom/d_net.c
index 29e2e7c6..15f1098e 100644
--- a/src/doom/d_net.c
+++ b/src/doom/d_net.c
@@ -216,20 +216,9 @@ static void InitConnectData(net_connect_data_t *connect_data)
connect_data->is_freedoom = W_CheckNumForName("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);
-
- // Call D_QuitNetGame on exit
-
- I_AtExit(D_QuitNetGame, true);
InitConnectData(&connect_data);
netgame = D_InitNetGame(&connect_data);
@@ -246,12 +235,23 @@ void D_CheckNetGame (void)
{
netgame = true;
}
+}
+
+//
+// D_CheckNetGame
+// Works out player numbers among the net participants
+//
+void D_CheckNetGame (void)
+{
+ net_gamesettings_t settings;
if (netgame)
{
autostart = true;
}
+ D_RegisterLoopCallbacks(&doom_loop_interface);
+
SaveGameSettings(&settings);
D_StartNetGame(&settings);
LoadGameSettings(&settings);