Fixed a bug that created multiple uneccessary windows for every computer player behind the correct waiting for players window when you created a match or a tournament. That fixed also the bug that the Ai joint the chat with the name of the human player.

This commit is contained in:
LevelX2 2012-11-09 16:17:23 +01:00
parent ff18f32b94
commit 2745d31768

View file

@ -146,10 +146,10 @@ public class TableController {
table.joinTable(player, seat);
User user = UserManager.getInstance().getUser(userId);
user.addTable(player.getId(), table);
user.joinedTable(table.getRoomId(), table.getId(), true);
logger.info("player joined " + player.getId());
//only add human players to sessionPlayerMap
//only inform human players and add them to sessionPlayerMap
if (seat.getPlayer().isHuman()) {
user.joinedTable(table.getRoomId(), table.getId(), true);
userPlayerMap.put(userId, player.getId());
}
@ -174,10 +174,10 @@ public class TableController {
table.joinTable(player, seat);
User user = UserManager.getInstance().getUser(userId);
user.addTable(player.getId(), table);
user.joinedTable(table.getRoomId(), table.getId(), false);
logger.info("player joined " + player.getId());
//only add human players to sessionPlayerMap
//only inform human players and add them to sessionPlayerMap
if (seat.getPlayer().isHuman()) {
user.joinedTable(table.getRoomId(), table.getId(), false);
userPlayerMap.put(userId, player.getId());
}