When restoring Coop setting from netgame profile don't forget to fix max players variable
This commit is contained in:
parent
23197f52e5
commit
bdeb0a70b4
|
@ -3,6 +3,7 @@ D2X-Rebirth Changelog
|
||||||
20110522
|
20110522
|
||||||
--------
|
--------
|
||||||
editor/med.c, main/game.c, main/gameseg.c, main/gameseq.c, main/menu.c: Like in BigEndian builds do netmisc_calc_checksum() only with expected items of segment/side struct to prevent different checksums in case these structs change; Fixed several issues when building with editor; Fixed compiler warning regarding set but unused variable
|
editor/med.c, main/game.c, main/gameseg.c, main/gameseq.c, main/menu.c: Like in BigEndian builds do netmisc_calc_checksum() only with expected items of segment/side struct to prevent different checksums in case these structs change; Fixed several issues when building with editor; Fixed compiler warning regarding set but unused variable
|
||||||
|
main/net_udp.c: When restoring Coop setting from netgame profile don't forget to fix max players variable
|
||||||
|
|
||||||
20110520
|
20110520
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -3270,12 +3270,11 @@ int net_udp_setup_game()
|
||||||
if (i!=Player_num)
|
if (i!=Player_num)
|
||||||
Players[i].callsign[0]=0;
|
Players[i].callsign[0]=0;
|
||||||
|
|
||||||
MaxNumNetPlayers = MAX_NUM_NET_PLAYERS;
|
Netgame.max_numplayers = MaxNumNetPlayers = MAX_NUM_NET_PLAYERS;
|
||||||
Netgame.KillGoal=0;
|
Netgame.KillGoal=0;
|
||||||
Netgame.PlayTimeAllowed=0;
|
Netgame.PlayTimeAllowed=0;
|
||||||
Netgame.Allow_marker_view=1;
|
Netgame.Allow_marker_view=1;
|
||||||
Netgame.difficulty=PlayerCfg.DefaultDifficulty;
|
Netgame.difficulty=PlayerCfg.DefaultDifficulty;
|
||||||
Netgame.max_numplayers=MaxNumNetPlayers;
|
|
||||||
sprintf( Netgame.game_name, "%s%s", Players[Player_num].callsign, TXT_S_GAME );
|
sprintf( Netgame.game_name, "%s%s", Players[Player_num].callsign, TXT_S_GAME );
|
||||||
if (GameArg.MplUdpMyPort != 0)
|
if (GameArg.MplUdpMyPort != 0)
|
||||||
snprintf (UDP_MyPort, sizeof(UDP_MyPort), "%d", GameArg.MplUdpMyPort);
|
snprintf (UDP_MyPort, sizeof(UDP_MyPort), "%d", GameArg.MplUdpMyPort);
|
||||||
|
@ -3293,6 +3292,9 @@ int net_udp_setup_game()
|
||||||
|
|
||||||
read_netgame_profile(&Netgame);
|
read_netgame_profile(&Netgame);
|
||||||
|
|
||||||
|
if (Netgame.gamemode == NETGAME_COOPERATIVE) // did we resotred Coop as default? then fix max players right now!
|
||||||
|
Netgame.max_numplayers = MaxNumNetPlayers = 4;
|
||||||
|
|
||||||
strcpy(Netgame.mission_name, Current_mission_filename);
|
strcpy(Netgame.mission_name, Current_mission_filename);
|
||||||
strcpy(Netgame.mission_title, Current_mission_longname);
|
strcpy(Netgame.mission_title, Current_mission_longname);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue