mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-06 05:24:46 +01:00
make undo ratio operate on 1/1000 scale -- and even with this it's
overwhelming when more than 40 clients are running.
This commit is contained in:
parent
c9264eecac
commit
dd242c3ff5
1 changed files with 3 additions and 3 deletions
|
@ -554,7 +554,7 @@ secondTimerFired( gpointer data )
|
|||
if ( !!game->server && !!game->board ) {
|
||||
XP_U16 undoRatio = cGlobals->params->undoRatio;
|
||||
if ( 0 != undoRatio ) {
|
||||
if ( (XP_RANDOM() % 100) < undoRatio ) {
|
||||
if ( (XP_RANDOM() % 1000) < undoRatio ) {
|
||||
XP_LOGF( "%s: calling server_handleUndo", __func__ );
|
||||
if ( server_handleUndo( game->server, 1 ) ) {
|
||||
board_draw( game->board );
|
||||
|
@ -2424,8 +2424,8 @@ main( int argc, char** argv )
|
|||
#ifdef USE_GLIBLOOP
|
||||
case CMD_UNDOPCT:
|
||||
mainParams.undoRatio = atoi( optarg );
|
||||
if ( mainParams.undoRatio < 0 || mainParams.undoRatio > 100 ) {
|
||||
usage(argv[0], "must be 0 <= n <= 100" );
|
||||
if ( mainParams.undoRatio < 0 || mainParams.undoRatio > 1000 ) {
|
||||
usage(argv[0], "must be 0 <= n <= 1000" );
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue