Skip to content

Commit

Permalink
Only set the bubble collision sensitivity and compressor on/off optio…
Browse files Browse the repository at this point in the history
…n per player 1 during a network game. These are the only options critical to distributed game synchronization.
  • Loading branch information
forteri76 committed May 12, 2014
1 parent f2d57c3 commit bd6c179
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/com/efortin/frozenbubble/NetworkGameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,18 @@ else if ((gameId != MulticastManager.FILTER_OFF) &&
if ((msgId == MSG_ID_PREFS) && (length == (PREFS_BYTES + 3))) {
if ((playerId == VirtualInput.PLAYER1) && localStatus.prefsRequest) {
copyPrefsFromBuffer(remotePrefs, buffer, 3);
PreferencesActivity.setFrozenBubblePrefs(remotePrefs);
/*
* In a network game, do not override any of the local game
* options that can be configuring during game play. Only
* set the bubble collision sensitivity and the compressor
* on/off option as specified by player 1, as these options
* are inaccessible during game play, and are absolutely
* necessary for distributed game behavior synchronization.
* All the other options are purely cosmetic, or may cause
* confusion if they are changed without notification.
*/
FrozenBubble.setCollision(remotePrefs.collision);
FrozenBubble.setCompressor(remotePrefs.compressor);
/*
* If all new game data synchronization requests have been
* fulfilled, then the network game is ready to begin.
Expand Down

0 comments on commit bd6c179

Please sign in to comment.