diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dffbb1d46..64b767000 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D2X-Rebirth Changelog 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 +main/net_udp.c: When restoring Coop setting from netgame profile don't forget to fix max players variable 20110520 -------- diff --git a/main/net_udp.c b/main/net_udp.c index 231bfb613..82609c966 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -3270,12 +3270,11 @@ int net_udp_setup_game() if (i!=Player_num) Players[i].callsign[0]=0; - MaxNumNetPlayers = MAX_NUM_NET_PLAYERS; + Netgame.max_numplayers = MaxNumNetPlayers = MAX_NUM_NET_PLAYERS; Netgame.KillGoal=0; Netgame.PlayTimeAllowed=0; Netgame.Allow_marker_view=1; Netgame.difficulty=PlayerCfg.DefaultDifficulty; - Netgame.max_numplayers=MaxNumNetPlayers; sprintf( Netgame.game_name, "%s%s", Players[Player_num].callsign, TXT_S_GAME ); if (GameArg.MplUdpMyPort != 0) snprintf (UDP_MyPort, sizeof(UDP_MyPort), "%d", GameArg.MplUdpMyPort); @@ -3293,6 +3292,9 @@ int net_udp_setup_game() 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_title, Current_mission_longname);