Fixed sending wrong race xml when a player disconnected because xml is getting data from gamestate yacht but the yachts are not updated is player disconnect.

Heartbeat packet was sent out at wrong rate which cause the player disconnect detection to be slow. Heartbeat packet is send out every 200ms now.

#story[1055] #pair[hyi25, zyt10]
This commit is contained in:
Zhi You Tan
2017-07-25 17:17:36 +12:00
parent 1a867be387
commit f544734b4d
4 changed files with 73 additions and 120 deletions
@@ -60,6 +60,10 @@ public class GameState {
yachts.put(sourceId, yacht);
}
public static void removeYacht(Integer yachtId) {
yachts.remove(yachtId);
}
public static Boolean getIsRaceStarted() {
return isRaceStarted;
}