diff --git a/WebContent/game.jsp b/WebContent/game.jsp
index f7ff2d3..b715cd9 100644
--- a/WebContent/game.jsp
+++ b/WebContent/game.jsp
@@ -95,12 +95,14 @@ HttpSession hSession = request.getSession(true);
If this is your first time playing, you may wish to read the changelog and list of
known issues.
- Most recent update: 28 April 2013:
+ Most recent update: 7 August 2013:
- - Version 1.3 of the base Cards Against Humanity game.
- - Card sets are grouped by official or custom.
- - You can view all of the cards in the game,
- including searching by text and filtering card set.
+ - The game list will not automatically update all the time now.
+ You will need to start using the Refresh Games button. The game list will automatically update
+ for new games, removed games, when games become passworded, or when you leave a game.
+ - A lot of custom card sets have been added.
+ - Cleaned up some error handling.
+ - Tried to fix some more of the server crashes.
Nickname:
diff --git a/WebContent/index.jsp b/WebContent/index.jsp
index 9539761..887b86c 100644
--- a/WebContent/index.jsp
+++ b/WebContent/index.jsp
@@ -54,6 +54,14 @@ to, for instance, display the number of connected players.
Recent Changes:
+ - 7 August 2013:
+ - The game list will not automatically update all the time now.
+ You will need to start using the Refresh Games button. The game list will automatically update
+ for new games, removed games, when games become passworded, or when you leave a game.
+ - A lot of custom card sets have been added.
+ - Cleaned up some error handling.
+ - Tried to fix some more of the server crashes.
+
- 28 April 2013:
- Version 1.3 of the base Cards Against Humanity game.
- Card sets are grouped by official or custom.
diff --git a/src/net/socialgamer/cah/data/Game.java b/src/net/socialgamer/cah/data/Game.java
index 0f73515..b291b92 100644
--- a/src/net/socialgamer/cah/data/Game.java
+++ b/src/net/socialgamer/cah/data/Game.java
@@ -195,7 +195,8 @@ public class Game {
data.put(LongPollResponse.NICKNAME, user.getNickname());
broadcastToPlayers(MessageType.GAME_PLAYER_EVENT, data);
- gameManager.broadcastGameListRefresh();
+ // Don't do this anymore, it was driving up a crazy amount of traffic.
+ // gameManager.broadcastGameListRefresh();
}
/**
@@ -263,7 +264,8 @@ public class Game {
data.put(LongPollResponse.NICKNAME, user.getNickname());
broadcastToPlayers(MessageType.GAME_PLAYER_EVENT, data);
- gameManager.broadcastGameListRefresh();
+ // Don't do this anymore, it was driving up a crazy amount of traffic.
+ // gameManager.broadcastGameListRefresh();
if (host == player) {
if (players.size() > 0) {
@@ -428,13 +430,13 @@ public class Game {
info.put(GameInfo.PASSWORD, password);
}
info.put(GameInfo.HAS_PASSWORD, password != null && !password.equals(""));
- synchronized (players) {
- final List playerNames = new ArrayList(players.size());
- for (final Player player : players) {
- playerNames.add(player.toString());
- }
- info.put(GameInfo.PLAYERS, playerNames);
+
+ final Player[] playersCopy = players.toArray(new Player[players.size()]);
+ final List playerNames = new ArrayList(playersCopy.length);
+ for (final Player player : playersCopy) {
+ playerNames.add(player.toString());
}
+ info.put(GameInfo.PLAYERS, playerNames);
return info;
}
@@ -444,12 +446,11 @@ public class Game {
*/
public List