From d15778e03c7159529464e01cff6f483d8bf4581f Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Mon, 5 Jul 2010 08:05:32 +0000 Subject: [PATCH] When selecting coop game mode, make sure that besides max players menu values also actual player number is set and menu text is updated properly --- CHANGELOG.txt | 1 + main/net_ipx.c | 2 ++ main/net_udp.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 810785deb..a8b5a4239 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D1X-Rebirth Changelog -------- main/kconfig.c: Fixing issue when assigning mouse button if a citem is still pointed out; Fixing still processing key commands even if we want to assign a key; After setting mouse button, reset mouse state properly arch/sdl/digi_mixer_music.c: Fixing issue introduced in rev1139: Game could of course not open music files which are not inside Searchpath or added to it - re-added playing over absolute path +main/net_ipx.c, main/net_udp.c: When selecting coop game mode, make sure that besides max players menu values also actual player number is set and menu text is updated properly 20100704 -------- diff --git a/main/net_ipx.c b/main/net_ipx.c index 2f8d0d612..3d5a21fc1 100644 --- a/main/net_ipx.c +++ b/main/net_ipx.c @@ -2368,6 +2368,8 @@ int net_ipx_game_param_handler( newmenu *menu, d_event *event, param_opt *opt ) { menus[opt->maxnet].max_value=2; } + sprintf( menus[opt->maxnet].text, "Maximum players: %d", menus[opt->maxnet].value+2 ); + Netgame.max_numplayers = MaxNumNetPlayers = menus[opt->maxnet].value+2; if (!(Netgame.game_flags & NETGAME_FLAG_SHOW_MAP)) Netgame.game_flags |= NETGAME_FLAG_SHOW_MAP; diff --git a/main/net_udp.c b/main/net_udp.c index 6c0cdb717..cc5f1e054 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -2816,6 +2816,8 @@ int net_udp_game_param_handler( newmenu *menu, d_event *event, param_opt *opt ) { menus[opt->maxnet].max_value=2; } + sprintf( menus[opt->maxnet].text, "Maximum players: %d", menus[opt->maxnet].value+2 ); + Netgame.max_numplayers = MaxNumNetPlayers = menus[opt->maxnet].value+2; if (!(Netgame.game_flags & NETGAME_FLAG_SHOW_MAP)) Netgame.game_flags |= NETGAME_FLAG_SHOW_MAP;