When switching from COOP to any other game mode, make sure Netgame.max_numplayers, MaxNumNetPlayers as well as the menu text showing the player limit is updated correctly

This commit is contained in:
zicodxx 2010-08-16 11:50:37 +00:00
parent 4b0c86f36d
commit cb933f9f80
3 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20100816
--------
main/net_ipx.c, main/net_udp.c: When switching from COOP to any other game mode, make sure Netgame.max_numplayers, MaxNumNetPlayers as well as the menu text showing the player limit is updated correctly
20100815
--------
INSTALL.txt, include/physfsx.h, main/inferno.c, misc/physfsx.c: Added support to automatically load/mount ZIP files at startup, giving option to dynamically override or replace game content; Updated docs

View file

@ -3041,6 +3041,8 @@ int net_ipx_game_param_handler( newmenu *menu, d_event *event, param_opt *opt )
oldmaxnet=0;
menus[opt->maxnet].value=6;
menus[opt->maxnet].max_value=6;
sprintf( menus[opt->maxnet].text, "Maximum players: %d", menus[opt->maxnet].value+2 );
Netgame.max_numplayers = MaxNumNetPlayers = menus[opt->maxnet].value+2;
}
}

View file

@ -3085,6 +3085,8 @@ int net_udp_game_param_handler( newmenu *menu, d_event *event, param_opt *opt )
oldmaxnet=0;
menus[opt->maxnet].value=6;
menus[opt->maxnet].max_value=6;
sprintf( menus[opt->maxnet].text, "Maximum players: %d", menus[opt->maxnet].value+2 );
Netgame.max_numplayers = MaxNumNetPlayers = menus[opt->maxnet].value+2;
}
}