mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
add assertion to catch too many players
This commit is contained in:
parent
768b63df24
commit
8b4042a082
1 changed files with 3 additions and 0 deletions
|
@ -2290,6 +2290,7 @@ main( int argc, char** argv )
|
|||
break;
|
||||
case CMD_PLAYERNAME:
|
||||
index = mainParams.pgi.nPlayers++;
|
||||
XP_ASSERT( index < MAX_NUM_PLAYERS );
|
||||
++mainParams.nLocalPlayers;
|
||||
mainParams.pgi.players[index].robotIQ = 0; /* means human */
|
||||
mainParams.pgi.players[index].isLocal = XP_TRUE;
|
||||
|
@ -2298,6 +2299,7 @@ main( int argc, char** argv )
|
|||
break;
|
||||
case CMD_REMOTEPLAYER:
|
||||
index = mainParams.pgi.nPlayers++;
|
||||
XP_ASSERT( index < MAX_NUM_PLAYERS );
|
||||
mainParams.pgi.players[index].isLocal = XP_FALSE;
|
||||
++mainParams.info.serverInfo.nRemotePlayers;
|
||||
break;
|
||||
|
@ -2308,6 +2310,7 @@ main( int argc, char** argv )
|
|||
case CMD_ROBOTNAME:
|
||||
++robotCount;
|
||||
index = mainParams.pgi.nPlayers++;
|
||||
XP_ASSERT( index < MAX_NUM_PLAYERS );
|
||||
++mainParams.nLocalPlayers;
|
||||
mainParams.pgi.players[index].robotIQ = 1; /* real smart by default */
|
||||
mainParams.pgi.players[index].isLocal = XP_TRUE;
|
||||
|
|
Loading…
Reference in a new issue