network_client.c
branchcustombridgeheads
changeset 5623 ef2a8a524a95
parent 5568 75f13d7bfaed
--- a/network_client.c	Mon Jan 01 16:10:01 2007 +0000
+++ b/network_client.c	Mon Jan 01 16:31:13 2007 +0000
@@ -491,13 +491,14 @@
 		_network_join_status = NETWORK_JOIN_STATUS_PROCESSING;
 		InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
 
-		// The map is done downloading, load it
-		// Load the map
+		/* The map is done downloading, load it */
 		if (!SafeSaveOrLoad(filename, SL_LOAD, GM_NORMAL)) {
 			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 			_switch_mode_errorstr = STR_NETWORK_ERR_SAVEGAMEERROR;
 			return NETWORK_RECV_STATUS_SAVEGAME;
 		}
+		/* If the savegame has successfully loaded, ALL windows have been removed,
+		 * only toolbar/statusbar and gamefield are visible */
 
 		_opt_ptr = &_opt; // during a network game you are always in-game
 
@@ -511,18 +512,16 @@
 
 			SetLocalPlayer(PLAYER_SPECTATOR);
 
-			if (_network_playas == PLAYER_SPECTATOR) {
-				// The client wants to be a spectator..
-				DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
-			} else {
+			if (_network_playas != PLAYER_SPECTATOR) {
 				/* We have arrived and ready to start playing; send a command to make a new player;
 				 * the server will give us a client-id and let us in */
+				_network_join_status = NETWORK_JOIN_STATUS_REGISTERING;
+				ShowJoinStatusWindow();
 				NetworkSend_Command(0, 0, 0, CMD_PLAYER_CTRL, NULL);
 			}
 		} else {
 			// take control over an existing company
 			SetLocalPlayer(_network_playas);
-			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 		}
 	}