fixed problem that the network needed to restart after the network family changed.

only a problem on joining games.
origin
stpohle 22 years ago
parent 31c4bf14cc
commit 33dc3a7a6e

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.18 2003/12/24 02:38:15 stpohle Exp $ */
/* $Id: main.c,v 1.19 2004/01/04 00:24:21 stpohle Exp $ */
#include "basic.h"
#include "bomberclone.h"

@ -194,7 +194,9 @@ void multiplayer_game () {
void
join_multiplayer_game ()
{
int i;
int i, old_ai_family;
old_ai_family = bman.net_ai_family;
multiplayer_firstrun ();
if (network_init () < 0) {
@ -202,8 +204,17 @@ join_multiplayer_game ()
return;
}
/* do the serverlist menu and join a server */
net_getserver ();
net_getserver (); /* show Serverlist */
/* if the AI Family Changed, restart the whole network */
if (old_ai_family != bman.net_ai_family) {
network_shutdown ();
if (network_init () < 0) {
d_printf ("network_init () FAILED\n");
return;
}
}
if (bman.servername[0] != 0) {
/* join the server, convert to a usable sockaddr first */
network_server_port (bman.servername, players[0].net.addr.host,

Loading…
Cancel
Save