Difference for main/network.c from version 1.7 to 1.8


version 1.7 version 1.8
Line 1981
 
Line 1981
 }  }
   
   
 void network_get_d1x_params(netgame_info *temp_game, int *new_socket, int multivalues[40])   {  void network_get_d1x_params(netgame_info *temp_game, int *new_socket, int multivalues[40], int force_d1x_only)   {
  int i, pps, socket;   int i, pps, socket;
 //        uint flags;  //        uint flags;
  int opt;   int opt;
Line 2026
 
Line 2026
  /* 3*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = "Network socket (-99 to 99)"; opt++;   /* 3*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = "Network socket (-99 to 99)"; opt++;
         /* 4*/ m[opt].type = NM_TYPE_INPUT; /*m[opt].text = ssocket;*/ m[opt].text_len = 3; opt++;          /* 4*/ m[opt].type = NM_TYPE_INPUT; /*m[opt].text = ssocket;*/ m[opt].text_len = 3; opt++;
   
    if (force_d1x_only) {
    //if we are forcing d1x-only, then "hide" these entries.  (Removing them entirely is too much of a pain with these hard-coded opt indices ;)
    /* 5*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = ""; opt++;
    /* 6*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = ""; opt++;
    } else {
  /* 5*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = "Options below need D1X only games"; opt++;   /* 5*/ m[opt].type = NM_TYPE_TEXT; m[opt].text = "Options below need D1X only games"; opt++;
         /* 6*/ m[opt].type = NM_TYPE_CHECK; m[opt].text = "D1X only game"; /*m[opt].value = (temp_game->protocol_version == MULTI_PROTO_D1X_VER);*/ opt++;          /* 6*/ m[opt].type = NM_TYPE_CHECK; m[opt].text = "D1X only game"; /*m[opt].value = (temp_game->protocol_version == MULTI_PROTO_D1X_VER);*/ opt++;
    }
 //added/edited on 11/1/98 by Matthew Mueller  //added/edited on 11/1/98 by Matthew Mueller
         /* 7*/ m[opt].type = NM_TYPE_SLIDER; m[opt].text = smaxplayers; /*m[opt].value = temp_game->max_numplayers - 2;*/ m[opt].min_value = 0; m[opt].max_value = MaxNumNetPlayers - 2; opt++;          /* 7*/ m[opt].type = NM_TYPE_SLIDER; m[opt].text = smaxplayers; /*m[opt].value = temp_game->max_numplayers - 2;*/ m[opt].min_value = 0; m[opt].max_value = MaxNumNetPlayers - 2; opt++;
 //end edit -MM  //end edit -MM
Line 2141
 
Line 2147
 #endif  #endif
 }  }
   
 int network_get_game_params( netgame_info *netgame, int *new_socket )  int network_get_game_params( netgame_info *netgame, int *new_socket, int force_d1x_only )
 {  {
  int i;   int i;
         int opt, opt_name, opt_level, opt_closed, opt_difficulty;          int opt, opt_name, opt_level, opt_closed, opt_difficulty;
Line 2174
 
Line 2180
   
  cur_temp_game = &temp_game;   cur_temp_game = &temp_game;
  memset(&temp_game, 0, sizeof(temp_game));   memset(&temp_game, 0, sizeof(temp_game));
    if (force_d1x_only)
    temp_game.protocol_version = MULTI_PROTO_D1X_VER;
    else
  temp_game.protocol_version = MULTI_PROTO_VERSION;   temp_game.protocol_version = MULTI_PROTO_VERSION;
         temp_game.difficulty = Player_default_difficulty;          temp_game.difficulty = Player_default_difficulty;
 #ifndef SHAREWARE  #ifndef SHAREWARE
Line 2303
 
Line 2312
  //if (!m[13].value)   //if (!m[13].value)
  //   nm_messagebox(TXT_ERROR, 1, TXT_OK, "You can only set D1X options\nfor D1X only games");   //   nm_messagebox(TXT_ERROR, 1, TXT_OK, "You can only set D1X options\nfor D1X only games");
  //else   //else
                         network_get_d1x_params(&temp_game, new_socket, multivalues);                          network_get_d1x_params(&temp_game, new_socket, multivalues, force_d1x_only);
  }   }
         //added/changed on 10/18/98 by Victor Rachels to add multiplayer profiles          //added/changed on 10/18/98 by Victor Rachels to add multiplayer profiles
                 if (i == 15) {                  if (i == 15) {
Line 2427
 
Line 2436
  temp_game.subprotocol = MULTI_PROTO_D1X_MINOR;   temp_game.subprotocol = MULTI_PROTO_D1X_MINOR;
  temp_game.required_subprotocol = 0;   temp_game.required_subprotocol = 0;
 #endif  #endif
    if (force_d1x_only) //just incase someone loaded a profile that set this otherwise.
    temp_game.protocol_version = MULTI_PROTO_D1X_VER;
                 *netgame = temp_game;                  *netgame = temp_game;
  }   }
  return i;   return i;
Line 2926
 
Line 2937
  return(1);    return(1);
 }  }
   
 void network_start_game(void)   void network_start_game(int force_d1x_only)
 {  {
  int i, new_socket;   int i, new_socket;
  //char game_name[NETGAME_NAME_LEN+1];   //char game_name[NETGAME_NAME_LEN+1];
Line 2958
 
Line 2969
   
  //game_flags = 0;   //game_flags = 0;
  new_socket = Network_socket;   new_socket = Network_socket;
  i = network_get_game_params( &Netgame, &new_socket );   i = network_get_game_params( &Netgame, &new_socket, force_d1x_only );
   
  if (i<0) return;   if (i<0) return;
   

Legend:
line(s) removed in v.1.7 
line(s) changed
 line(s) added in v.1.8