diff options
Diffstat (limited to 'src/hexen/d_net.c')
-rw-r--r-- | src/hexen/d_net.c | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c index bacd1332..2483cd5e 100644 --- a/src/hexen/d_net.c +++ b/src/hexen/d_net.c @@ -206,17 +206,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(&hexen_loop_interface); InitConnectData(&connect_data); netgame = D_InitNetGame(&connect_data); @@ -233,6 +225,33 @@ void D_CheckNetGame (void) { netgame = true; } +} + +static boolean StartupProgress(int now_ready, int total) +{ + static int ready = 0; + + while (ready < now_ready) + { + ST_NetProgress(); + ++ready; + } + + ready = now_ready; + + return true; +} + +// +// D_CheckNetGame +// Works out player numbers among the net participants +// + +void D_CheckNetGame(void) +{ + net_gamesettings_t settings; + + D_RegisterLoopCallbacks(&hexen_loop_interface); if (netgame) { @@ -240,8 +259,16 @@ void D_CheckNetGame (void) } SaveGameSettings(&settings); - D_StartNetGame(&settings); + D_StartNetGame(&settings, StartupProgress); LoadGameSettings(&settings); + + // Finish netgame progress on startup screen. + + if (netgame) + { + StartupProgress(settings.num_players, settings.num_players); + ST_NetDone(); + } } //========================================================================== |