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 0a86348aab
commit 791851ad82
3 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D1X-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

@ -2381,6 +2381,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

@ -2851,6 +2851,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;
}
}