void InitNetworkServer()
{
- if (!network.enabled)
+ if (!network.enabled || network.connected)
return;
if (!ConnectToServer(network.server_host, network.server_port))
network.enabled = FALSE;
+ setup.network_mode = FALSE;
+
return;
}
SendToServer_PlayerName(setup.player_name);
SendToServer_ProtocolVersion();
SendToServer_NrWanted(setup.network_player_nr + 1);
+
+ network.connected = TRUE;
}
static boolean CheckArtworkConfigForCustomElements(char *filename)
SDLNet_TCP_DelSocket(rfds, sfd);
SDLNet_TCP_Close(sfd);
- network.enabled = FALSE;
network_playing = FALSE;
+ network.enabled = FALSE;
+ network.connected = FALSE;
+
+ setup.network_mode = FALSE;
+
for (i = 0; i < MAX_PLAYERS; i++)
stored_player[i].connected_network = FALSE;
}