mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
fix bug: allow switch *to* player whose turn it is even if allowPeek
is off (typically because it was turned off after game was loaded and while non-turn player's tiles are visible)
This commit is contained in:
parent
fb8692fb9f
commit
5b3e41f4e9
1 changed files with 3 additions and 2 deletions
|
@ -818,13 +818,14 @@ static void
|
|||
selectPlayerImpl( BoardCtxt* board, XP_U16 newPlayer, XP_Bool reveal,
|
||||
XP_Bool canPeek )
|
||||
{
|
||||
if ( !board->gameOver && server_getCurrentTurn(board->server) < 0 ) {
|
||||
XP_S16 curTurn = server_getCurrentTurn(board->server);
|
||||
if ( !board->gameOver && curTurn < 0 ) {
|
||||
/* game not started yet; do nothing */
|
||||
} else if ( board->selPlayer == newPlayer ) {
|
||||
if ( reveal ) {
|
||||
checkRevealTray( board );
|
||||
}
|
||||
} else if ( canPeek ) {
|
||||
} else if ( canPeek || newPlayer == curTurn ) {
|
||||
PerTurnInfo* newInfo = &board->pti[newPlayer];
|
||||
XP_U16 oldPlayer = board->selPlayer;
|
||||
model_foreachPendingCell( board->model, newPlayer,
|
||||
|
|
Loading…
Reference in a new issue