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

This commit is contained in:
zicodxx 2010-07-05 08:05:32 +00:00
parent a7497054c3
commit d15778e03c
3 changed files with 5 additions and 0 deletions

View file

@ -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
--------

View file

@ -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;

View file

@ -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;